/* 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 { TrustpilotResponseConfig } from './TrustpilotResponseConfig.js';
import {
TrustpilotResponseConfigFromJSON,
TrustpilotResponseConfigFromJSONTyped,
TrustpilotResponseConfigToJSON,
TrustpilotResponseConfigToJSONTyped,
} from './TrustpilotResponseConfig.js';
/**
* Trustpilot Reviews integration record
* @export
* @interface TrustpilotIntegration
*/
export interface TrustpilotIntegration {
/**
*
* @type {number}
* @memberof TrustpilotIntegration
*/
id: number;
/**
*
* @type {string}
* @memberof TrustpilotIntegration
*/
integrationId: TrustpilotIntegrationIntegrationIdEnum;
/**
*
* @type {string}
* @memberof TrustpilotIntegration
*/
workspaceId: string;
/**
*
* @type {string}
* @memberof TrustpilotIntegration
*/
organisationId: string;
/**
*
* @type {TrustpilotResponseConfig}
* @memberof TrustpilotIntegration
*/
config: TrustpilotResponseConfig;
/**
*
* @type {Date}
* @memberof TrustpilotIntegration
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof TrustpilotIntegration
*/
updatedAt: Date;
}
/**
* @export
*/
export const TrustpilotIntegrationIntegrationIdEnum = {
TrustpilotReviews: 'TRUSTPILOT_REVIEWS'
} as const;
export type TrustpilotIntegrationIntegrationIdEnum = typeof TrustpilotIntegrationIntegrationIdEnum[keyof typeof TrustpilotIntegrationIntegrationIdEnum];
/**
* Check if a given object implements the TrustpilotIntegration interface.
*/
export function instanceOfTrustpilotIntegration(value: object): value is TrustpilotIntegration {
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 TrustpilotIntegrationFromJSON(json: any): TrustpilotIntegration {
return TrustpilotIntegrationFromJSONTyped(json, false);
}
export function TrustpilotIntegrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrustpilotIntegration {
if (json == null) {
return json;
}
return {
'id': json['id'],
'integrationId': json['integrationId'],
'workspaceId': json['workspaceId'],
'organisationId': json['organisationId'],
'config': TrustpilotResponseConfigFromJSON(json['config']),
'createdAt': (new Date(json['createdAt'])),
'updatedAt': (new Date(json['updatedAt'])),
};
}
export function TrustpilotIntegrationToJSON(json: any): TrustpilotIntegration {
return TrustpilotIntegrationToJSONTyped(json, false);
}
export function TrustpilotIntegrationToJSONTyped(value?: TrustpilotIntegration | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'integrationId': value['integrationId'],
'workspaceId': value['workspaceId'],
'organisationId': value['organisationId'],
'config': TrustpilotResponseConfigToJSON(value['config']),
'createdAt': ((value['createdAt']).toISOString()),
'updatedAt': ((value['updatedAt']).toISOString()),
};
}