UNPKG

umbraco-management-api-client

Version:

TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)

82 lines (81 loc) 3.59 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Umbraco Management API * This shows all APIs available in this version of Umbraco - including all the legacy apis that are available for backward compatibility * * The version of the OpenAPI document: Latest * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfDocumentReferenceResponseModel = instanceOfDocumentReferenceResponseModel; exports.DocumentReferenceResponseModelFromJSON = DocumentReferenceResponseModelFromJSON; exports.DocumentReferenceResponseModelFromJSONTyped = DocumentReferenceResponseModelFromJSONTyped; exports.DocumentReferenceResponseModelToJSON = DocumentReferenceResponseModelToJSON; exports.DocumentReferenceResponseModelToJSONTyped = DocumentReferenceResponseModelToJSONTyped; const DocumentItemResponseModelVariantsInner_1 = require("./DocumentItemResponseModelVariantsInner"); const TrackedReferenceDocumentTypeModel_1 = require("./TrackedReferenceDocumentTypeModel"); /** * Check if a given object implements the DocumentReferenceResponseModel interface. */ function instanceOfDocumentReferenceResponseModel(value) { if (!('$type' in value) || value['$type'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('documentType' in value) || value['documentType'] === undefined) return false; if (!('variants' in value) || value['variants'] === undefined) return false; return true; } function DocumentReferenceResponseModelFromJSON(json) { return DocumentReferenceResponseModelFromJSONTyped(json, false); } function DocumentReferenceResponseModelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } if (!ignoreDiscriminator) { if (json['$type'] === 'DocumentReferenceResponseModel') { return DocumentReferenceResponseModelFromJSONTyped(json, ignoreDiscriminator); } } return { '$type': json['$type'], 'id': json['id'], 'name': json['name'] == null ? undefined : json['name'], 'published': json['published'] == null ? undefined : json['published'], 'documentType': (0, TrackedReferenceDocumentTypeModel_1.TrackedReferenceDocumentTypeModelFromJSON)(json['documentType']), 'variants': (json['variants'].map(DocumentItemResponseModelVariantsInner_1.DocumentItemResponseModelVariantsInnerFromJSON)), }; } function DocumentReferenceResponseModelToJSON(json) { return DocumentReferenceResponseModelToJSONTyped(json, false); } function DocumentReferenceResponseModelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } if (!ignoreDiscriminator) { switch (value['$type']) { case 'DocumentReferenceResponseModel': return DocumentReferenceResponseModelToJSONTyped(value, ignoreDiscriminator); default: return value; } } return { '$type': value['$type'], 'id': value['id'], 'name': value['name'], 'published': value['published'], 'documentType': (0, TrackedReferenceDocumentTypeModel_1.TrackedReferenceDocumentTypeModelToJSON)(value['documentType']), 'variants': (value['variants'].map(DocumentItemResponseModelVariantsInner_1.DocumentItemResponseModelVariantsInnerToJSON)), }; }