/* tslint:disable */ /* eslint-disable */ /** * Fabric API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * 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'; import type { IntegrationStatus } from './IntegrationStatus'; import { IntegrationStatusFromJSON, IntegrationStatusFromJSONTyped, IntegrationStatusToJSON, IntegrationStatusToJSONTyped, } from './IntegrationStatus'; import type { IntegrationType } from './IntegrationType'; import { IntegrationTypeFromJSON, IntegrationTypeFromJSONTyped, IntegrationTypeToJSON, IntegrationTypeToJSONTyped, } from './IntegrationType'; /** * * @export * @interface PublicIntegrationSchema */ export interface PublicIntegrationSchema { /** * * @type {string} * @memberof PublicIntegrationSchema */ 'id': string; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'userId': string; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'externalId': string; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'email': string | null; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'displayName': string; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'pictureUrl': string | null; /** * * @type {IntegrationType} * @memberof PublicIntegrationSchema */ 'type': IntegrationType; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'createdAt': string; /** * * @type {string} * @memberof PublicIntegrationSchema */ 'modifiedAt': string; /** * * @type {IntegrationStatus} * @memberof PublicIntegrationSchema */ 'status': IntegrationStatus; /** * * @type {{ [key: string]: any | null; }} * @memberof PublicIntegrationSchema */ 'statusMessages': { [key: string]: any | null; }; /** * * @type {boolean} * @memberof PublicIntegrationSchema */ 'isPrivate': boolean; /** * * @type {boolean} * @memberof PublicIntegrationSchema */ 'needsReinstall': boolean; } /** * Check if a given object implements the PublicIntegrationSchema interface. */ export function instanceOfPublicIntegrationSchema(value: object): value is PublicIntegrationSchema { if (!('id' in value) || value['id'] === undefined) return false; if (!('userId' in value) || value['userId'] === undefined) return false; if (!('externalId' in value) || value['externalId'] === undefined) return false; if (!('email' in value) || value['email'] === undefined) return false; if (!('displayName' in value) || value['displayName'] === undefined) return false; if (!('pictureUrl' in value) || value['pictureUrl'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('modifiedAt' in value) || value['modifiedAt'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('statusMessages' in value) || value['statusMessages'] === undefined) return false; if (!('isPrivate' in value) || value['isPrivate'] === undefined) return false; if (!('needsReinstall' in value) || value['needsReinstall'] === undefined) return false; return true; } export function PublicIntegrationSchemaFromJSON(json: any): PublicIntegrationSchema { return PublicIntegrationSchemaFromJSONTyped(json, false); } export function PublicIntegrationSchemaFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicIntegrationSchema { if (json == null) { return json; } const result = { } as PublicIntegrationSchema; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['userId'] !== undefined) { result['userId'] = json['userId']; } if (json['externalId'] !== undefined) { result['externalId'] = json['externalId']; } if (json['email'] !== undefined) { if (json['email'] === null) { result['email'] = null; } else { result['email'] = json['email']; } } if (json['displayName'] !== undefined) { result['displayName'] = json['displayName']; } if (json['pictureUrl'] !== undefined) { if (json['pictureUrl'] === null) { result['pictureUrl'] = null; } else { result['pictureUrl'] = json['pictureUrl']; } } if (json['type'] !== undefined) { result['type'] = IntegrationTypeFromJSON(json['type']); } if (json['createdAt'] !== undefined) { result['createdAt'] = json['createdAt']; } if (json['modifiedAt'] !== undefined) { result['modifiedAt'] = json['modifiedAt']; } if (json['status'] !== undefined) { result['status'] = IntegrationStatusFromJSON(json['status']); } if (json['statusMessages'] !== undefined) { result['statusMessages'] = json['statusMessages']; } if (json['isPrivate'] !== undefined) { result['isPrivate'] = json['isPrivate']; } if (json['needsReinstall'] !== undefined) { result['needsReinstall'] = json['needsReinstall']; } return result; } export function PublicIntegrationSchemaToJSON(json: any): PublicIntegrationSchema { return PublicIntegrationSchemaToJSONTyped(json, false); } export function PublicIntegrationSchemaToJSONTyped(value?: PublicIntegrationSchema | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'userId': value['userId'], 'externalId': value['externalId'], 'email': value['email'], 'displayName': value['displayName'], 'pictureUrl': value['pictureUrl'], 'type': IntegrationTypeToJSON(value['type']), 'createdAt': value['createdAt'], 'modifiedAt': value['modifiedAt'], 'status': IntegrationStatusToJSON(value['status']), 'statusMessages': value['statusMessages'], 'isPrivate': value['isPrivate'], 'needsReinstall': value['needsReinstall'], }; }