UNPKG

umbraco-management-api-client

Version:

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

69 lines (68 loc) 2.87 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.instanceOfRelationResponseModel = instanceOfRelationResponseModel; exports.RelationResponseModelFromJSON = RelationResponseModelFromJSON; exports.RelationResponseModelFromJSONTyped = RelationResponseModelFromJSONTyped; exports.RelationResponseModelToJSON = RelationResponseModelToJSON; exports.RelationResponseModelToJSONTyped = RelationResponseModelToJSONTyped; const RelationReferenceModel_1 = require("./RelationReferenceModel"); const ReferenceByIdModel_1 = require("./ReferenceByIdModel"); /** * Check if a given object implements the RelationResponseModel interface. */ function instanceOfRelationResponseModel(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('relationType' in value) || value['relationType'] === undefined) return false; if (!('parent' in value) || value['parent'] === undefined) return false; if (!('child' in value) || value['child'] === undefined) return false; if (!('createDate' in value) || value['createDate'] === undefined) return false; return true; } function RelationResponseModelFromJSON(json) { return RelationResponseModelFromJSONTyped(json, false); } function RelationResponseModelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'], 'relationType': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['relationType']), 'parent': (0, RelationReferenceModel_1.RelationReferenceModelFromJSON)(json['parent']), 'child': (0, RelationReferenceModel_1.RelationReferenceModelFromJSON)(json['child']), 'createDate': (new Date(json['createDate'])), 'comment': json['comment'] == null ? undefined : json['comment'], }; } function RelationResponseModelToJSON(json) { return RelationResponseModelToJSONTyped(json, false); } function RelationResponseModelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'id': value['id'], 'relationType': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['relationType']), 'parent': (0, RelationReferenceModel_1.RelationReferenceModelToJSON)(value['parent']), 'child': (0, RelationReferenceModel_1.RelationReferenceModelToJSON)(value['child']), }; }