Topic.ts•2.48 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';
/**
* Topic data for organizing insight
* @export
* @interface Topic
*/
export interface Topic {
/**
*
* @type {string}
* @memberof Topic
*/
id: string;
/**
* Title of the topic
* @type {string}
* @memberof Topic
*/
title: string;
/**
* Description of the topic
* @type {string}
* @memberof Topic
*/
description: string;
/**
* Creation timestamp
* @type {string}
* @memberof Topic
*/
createdAt: string;
/**
* Last update timestamp
* @type {string}
* @memberof Topic
*/
updatedAt: string;
}
/**
* Check if a given object implements the Topic interface.
*/
export function instanceOfTopic(value: object): value is Topic {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('title' in value) || value['title'] === undefined) return false;
if (!('description' in value) || value['description'] === undefined) return false;
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
return true;
}
export function TopicFromJSON(json: any): Topic {
return TopicFromJSONTyped(json, false);
}
export function TopicFromJSONTyped(json: any, ignoreDiscriminator: boolean): Topic {
if (json == null) {
return json;
}
return {
'id': json['id'],
'title': json['title'],
'description': json['description'],
'createdAt': json['createdAt'],
'updatedAt': json['updatedAt'],
};
}
export function TopicToJSON(json: any): Topic {
return TopicToJSONTyped(json, false);
}
export function TopicToJSONTyped(value?: Topic | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'title': value['title'],
'description': value['description'],
'createdAt': value['createdAt'],
'updatedAt': value['updatedAt'],
};
}