CreateTopicPayload.ts•2.75 kB
/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 4.0.0
* Contact: help@meetsquad.ai
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime.js';
/**
* Request schema for creating a topic
* @export
* @interface CreateTopicPayload
*/
export interface CreateTopicPayload {
/**
*
* @type {string}
* @memberof CreateTopicPayload
*/
id?: string;
/**
* Title of the topic
* @type {string}
* @memberof CreateTopicPayload
*/
title: string;
/**
* Description of the topic
* @type {string}
* @memberof CreateTopicPayload
*/
description: string;
/**
* List of opportunity IDs associated with the topic
* @type {Array<string>}
* @memberof CreateTopicPayload
*/
opportunityIds?: Array<string>;
/**
* List of insight IDs associated with the topic
* @type {Array<string>}
* @memberof CreateTopicPayload
*/
insightIds?: Array<string>;
}
/**
* Check if a given object implements the CreateTopicPayload interface.
*/
export function instanceOfCreateTopicPayload(value: object): value is CreateTopicPayload {
if (!('title' in value) || value['title'] === undefined) return false;
if (!('description' in value) || value['description'] === undefined) return false;
return true;
}
export function CreateTopicPayloadFromJSON(json: any): CreateTopicPayload {
return CreateTopicPayloadFromJSONTyped(json, false);
}
export function CreateTopicPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTopicPayload {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'title': json['title'],
'description': json['description'],
'opportunityIds': json['opportunityIds'] == null ? undefined : json['opportunityIds'],
'insightIds': json['insightIds'] == null ? undefined : json['insightIds'],
};
}
export function CreateTopicPayloadToJSON(json: any): CreateTopicPayload {
return CreateTopicPayloadToJSONTyped(json, false);
}
export function CreateTopicPayloadToJSONTyped(value?: CreateTopicPayload | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'title': value['title'],
'description': value['description'],
'opportunityIds': value['opportunityIds'],
'insightIds': value['insightIds'],
};
}