/* 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 { ResourceRootFolder } from './ResourceRootFolder'; import { ResourceRootFolderFromJSON, ResourceRootFolderFromJSONTyped, ResourceRootFolderToJSON, ResourceRootFolderToJSONTyped, } from './ResourceRootFolder'; import type { IntegrationType } from './IntegrationType'; import { IntegrationTypeFromJSON, IntegrationTypeFromJSONTyped, IntegrationTypeToJSON, IntegrationTypeToJSONTyped, } from './IntegrationType'; /** * * @export * @interface ResourceRootIntegration */ export interface ResourceRootIntegration { /** * * @type {string} * @memberof ResourceRootIntegration */ 'id': string; /** * * @type {string} * @memberof ResourceRootIntegration */ 'type': ResourceRootIntegrationTypeEnum; /** * * @type {string} * @memberof ResourceRootIntegration */ 'createdAt': string; /** * * @type {string} * @memberof ResourceRootIntegration */ 'modifiedAt': string; /** * * @type {boolean} * @memberof ResourceRootIntegration */ 'isPrivate': boolean; /** * The timestamp of when the last descendant resource was added * @type {string} * @memberof ResourceRootIntegration */ 'lastResourceAddedAt'?: string | null; /** * * @type {ResourceRootFolder} * @memberof ResourceRootIntegration */ 'folder': ResourceRootFolder; /** * * @type {IntegrationType} * @memberof ResourceRootIntegration */ 'subtype': IntegrationType; } /** * @export */ export const ResourceRootIntegrationTypeEnum = { Integration: 'INTEGRATION' } as const; export type ResourceRootIntegrationTypeEnum = typeof ResourceRootIntegrationTypeEnum[keyof typeof ResourceRootIntegrationTypeEnum]; /** * Check if a given object implements the ResourceRootIntegration interface. */ export function instanceOfResourceRootIntegration(value: object): value is ResourceRootIntegration { if (!('id' in value) || value['id'] === 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 (!('isPrivate' in value) || value['isPrivate'] === undefined) return false; if (!('folder' in value) || value['folder'] === undefined) return false; if (!('subtype' in value) || value['subtype'] === undefined) return false; return true; } export function ResourceRootIntegrationFromJSON(json: any): ResourceRootIntegration { return ResourceRootIntegrationFromJSONTyped(json, false); } export function ResourceRootIntegrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceRootIntegration { if (json == null) { return json; } const result = { } as ResourceRootIntegration; if (json['id'] !== undefined) { result['id'] = json['id']; } if (json['type'] !== undefined) { result['type'] = json['type']; } if (json['createdAt'] !== undefined) { result['createdAt'] = json['createdAt']; } if (json['modifiedAt'] !== undefined) { result['modifiedAt'] = json['modifiedAt']; } if (json['isPrivate'] !== undefined) { result['isPrivate'] = json['isPrivate']; } if (json['lastResourceAddedAt'] !== undefined) { if (json['lastResourceAddedAt'] === null) { result['lastResourceAddedAt'] = null; } else { result['lastResourceAddedAt'] = json['lastResourceAddedAt']; } } if (json['folder'] !== undefined) { result['folder'] = ResourceRootFolderFromJSON(json['folder']); } if (json['subtype'] !== undefined) { result['subtype'] = IntegrationTypeFromJSON(json['subtype']); } return result; } export function ResourceRootIntegrationToJSON(json: any): ResourceRootIntegration { return ResourceRootIntegrationToJSONTyped(json, false); } export function ResourceRootIntegrationToJSONTyped(value?: ResourceRootIntegration | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'type': value['type'], 'createdAt': value['createdAt'], 'modifiedAt': value['modifiedAt'], 'isPrivate': value['isPrivate'], 'lastResourceAddedAt': value['lastResourceAddedAt'], 'folder': ResourceRootFolderToJSON(value['folder']), 'subtype': IntegrationTypeToJSON(value['subtype']), }; }