UNPKG

umbraco-management-api-client

Version:

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

70 lines (69 loc) 2.98 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.instanceOfRelationTypeResponseModel = instanceOfRelationTypeResponseModel; exports.RelationTypeResponseModelFromJSON = RelationTypeResponseModelFromJSON; exports.RelationTypeResponseModelFromJSONTyped = RelationTypeResponseModelFromJSONTyped; exports.RelationTypeResponseModelToJSON = RelationTypeResponseModelToJSON; exports.RelationTypeResponseModelToJSONTyped = RelationTypeResponseModelToJSONTyped; const ObjectTypeResponseModel_1 = require("./ObjectTypeResponseModel"); /** * Check if a given object implements the RelationTypeResponseModel interface. */ function instanceOfRelationTypeResponseModel(value) { if (!('name' in value) || value['name'] === undefined) return false; if (!('isBidirectional' in value) || value['isBidirectional'] === undefined) return false; if (!('isDependency' in value) || value['isDependency'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; return true; } function RelationTypeResponseModelFromJSON(json) { return RelationTypeResponseModelFromJSONTyped(json, false); } function RelationTypeResponseModelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'name': json['name'], 'isBidirectional': json['isBidirectional'], 'isDependency': json['isDependency'], 'id': json['id'], 'alias': json['alias'] == null ? undefined : json['alias'], 'parentObject': json['parentObject'] == null ? undefined : (0, ObjectTypeResponseModel_1.ObjectTypeResponseModelFromJSON)(json['parentObject']), 'childObject': json['childObject'] == null ? undefined : (0, ObjectTypeResponseModel_1.ObjectTypeResponseModelFromJSON)(json['childObject']), }; } function RelationTypeResponseModelToJSON(json) { return RelationTypeResponseModelToJSONTyped(json, false); } function RelationTypeResponseModelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'name': value['name'], 'isBidirectional': value['isBidirectional'], 'isDependency': value['isDependency'], 'id': value['id'], 'alias': value['alias'], 'parentObject': (0, ObjectTypeResponseModel_1.ObjectTypeResponseModelToJSON)(value['parentObject']), 'childObject': (0, ObjectTypeResponseModel_1.ObjectTypeResponseModelToJSON)(value['childObject']), }; }