ListTopics200Response.ts•2.18 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';
import type { TopicWithRelationships } from './TopicWithRelationships.js';
import {
TopicWithRelationshipsFromJSON,
TopicWithRelationshipsFromJSONTyped,
TopicWithRelationshipsToJSON,
TopicWithRelationshipsToJSONTyped,
} from './TopicWithRelationships.js';
/**
* Response containing an array of topics
* @export
* @interface ListTopics200Response
*/
export interface ListTopics200Response {
[key: string]: any | any;
/**
* Array of topics
* @type {Array<TopicWithRelationships>}
* @memberof ListTopics200Response
*/
data: Array<TopicWithRelationships>;
}
/**
* Check if a given object implements the ListTopics200Response interface.
*/
export function instanceOfListTopics200Response(value: object): value is ListTopics200Response {
if (!('data' in value) || value['data'] === undefined) return false;
return true;
}
export function ListTopics200ResponseFromJSON(json: any): ListTopics200Response {
return ListTopics200ResponseFromJSONTyped(json, false);
}
export function ListTopics200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListTopics200Response {
if (json == null) {
return json;
}
return {
...json,
'data': ((json['data'] as Array<any>).map(TopicWithRelationshipsFromJSON)),
};
}
export function ListTopics200ResponseToJSON(json: any): ListTopics200Response {
return ListTopics200ResponseToJSONTyped(json, false);
}
export function ListTopics200ResponseToJSONTyped(value?: ListTopics200Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
...value,
'data': ((value['data'] as Array<any>).map(TopicWithRelationshipsToJSON)),
};
}