/* 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 { GoogleReviewsResponseConfig } from './GoogleReviewsResponseConfig.js';
import {
GoogleReviewsResponseConfigFromJSON,
GoogleReviewsResponseConfigFromJSONTyped,
GoogleReviewsResponseConfigToJSON,
GoogleReviewsResponseConfigToJSONTyped,
} from './GoogleReviewsResponseConfig.js';
/**
* Google Reviews integration record
* @export
* @interface GoogleReviewsIntegration
*/
export interface GoogleReviewsIntegration {
/**
*
* @type {number}
* @memberof GoogleReviewsIntegration
*/
id: number;
/**
*
* @type {string}
* @memberof GoogleReviewsIntegration
*/
integrationId: GoogleReviewsIntegrationIntegrationIdEnum;
/**
*
* @type {string}
* @memberof GoogleReviewsIntegration
*/
workspaceId: string;
/**
*
* @type {string}
* @memberof GoogleReviewsIntegration
*/
organisationId: string;
/**
*
* @type {GoogleReviewsResponseConfig}
* @memberof GoogleReviewsIntegration
*/
config: GoogleReviewsResponseConfig;
/**
*
* @type {Date}
* @memberof GoogleReviewsIntegration
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof GoogleReviewsIntegration
*/
updatedAt: Date;
}
/**
* @export
*/
export const GoogleReviewsIntegrationIntegrationIdEnum = {
GoogleReviews: 'GOOGLE_REVIEWS'
} as const;
export type GoogleReviewsIntegrationIntegrationIdEnum = typeof GoogleReviewsIntegrationIntegrationIdEnum[keyof typeof GoogleReviewsIntegrationIntegrationIdEnum];
/**
* Check if a given object implements the GoogleReviewsIntegration interface.
*/
export function instanceOfGoogleReviewsIntegration(value: object): value is GoogleReviewsIntegration {
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 GoogleReviewsIntegrationFromJSON(json: any): GoogleReviewsIntegration {
return GoogleReviewsIntegrationFromJSONTyped(json, false);
}
export function GoogleReviewsIntegrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleReviewsIntegration {
if (json == null) {
return json;
}
return {
'id': json['id'],
'integrationId': json['integrationId'],
'workspaceId': json['workspaceId'],
'organisationId': json['organisationId'],
'config': GoogleReviewsResponseConfigFromJSON(json['config']),
'createdAt': (new Date(json['createdAt'])),
'updatedAt': (new Date(json['updatedAt'])),
};
}
export function GoogleReviewsIntegrationToJSON(json: any): GoogleReviewsIntegration {
return GoogleReviewsIntegrationToJSONTyped(json, false);
}
export function GoogleReviewsIntegrationToJSONTyped(value?: GoogleReviewsIntegration | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'integrationId': value['integrationId'],
'workspaceId': value['workspaceId'],
'organisationId': value['organisationId'],
'config': GoogleReviewsResponseConfigToJSON(value['config']),
'createdAt': ((value['createdAt']).toISOString()),
'updatedAt': ((value['updatedAt']).toISOString()),
};
}