/* tslint:disable */
/* eslint-disable */
/**
* Squad API
* API for managing Squad resources
*
* The version of the OpenAPI document: 4.8.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 { GongDbConfig } from './GongDbConfig.js';
import {
GongDbConfigFromJSON,
GongDbConfigFromJSONTyped,
GongDbConfigToJSON,
GongDbConfigToJSONTyped,
} from './GongDbConfig.js';
/**
* Gong integration record
* @export
* @interface GongIntegration
*/
export interface GongIntegration {
/**
*
* @type {number}
* @memberof GongIntegration
*/
id: number;
/**
*
* @type {string}
* @memberof GongIntegration
*/
integrationId: GongIntegrationIntegrationIdEnum;
/**
*
* @type {string}
* @memberof GongIntegration
*/
workspaceId: string;
/**
*
* @type {string}
* @memberof GongIntegration
*/
organisationId: string;
/**
* Gong integration configuration in API response
* @type {GongDbConfig}
* @memberof GongIntegration
*/
config: GongDbConfig;
/**
*
* @type {Date}
* @memberof GongIntegration
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof GongIntegration
*/
updatedAt: Date;
}
/**
* @export
*/
export const GongIntegrationIntegrationIdEnum = {
Gong: 'GONG'
} as const;
export type GongIntegrationIntegrationIdEnum = typeof GongIntegrationIntegrationIdEnum[keyof typeof GongIntegrationIntegrationIdEnum];
/**
* Check if a given object implements the GongIntegration interface.
*/
export function instanceOfGongIntegration(value: object): value is GongIntegration {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('integrationId' in value) || value['integrationId'] === undefined) return false;
if (!('workspaceId' in value) || value['workspaceId'] === undefined) return false;
if (!('organisationId' in value) || value['organisationId'] === undefined) return false;
if (!('config' in value) || value['config'] === 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 GongIntegrationFromJSON(json: any): GongIntegration {
return GongIntegrationFromJSONTyped(json, false);
}
export function GongIntegrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): GongIntegration {
if (json == null) {
return json;
}
return {
'id': json['id'],
'integrationId': json['integrationId'],
'workspaceId': json['workspaceId'],
'organisationId': json['organisationId'],
'config': GongDbConfigFromJSON(json['config']),
'createdAt': (new Date(json['createdAt'])),
'updatedAt': (new Date(json['updatedAt'])),
};
}
export function GongIntegrationToJSON(json: any): GongIntegration {
return GongIntegrationToJSONTyped(json, false);
}
export function GongIntegrationToJSONTyped(value?: GongIntegration | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'integrationId': value['integrationId'],
'workspaceId': value['workspaceId'],
'organisationId': value['organisationId'],
'config': GongDbConfigToJSON(value['config']),
'createdAt': ((value['createdAt']).toISOString()),
'updatedAt': ((value['updatedAt']).toISOString()),
};
}