UNPKG

umbraco-management-api-client

Version:

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

90 lines (89 loc) 4.42 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.instanceOfCreateDocumentTypePropertyTypeRequestModel = instanceOfCreateDocumentTypePropertyTypeRequestModel; exports.CreateDocumentTypePropertyTypeRequestModelFromJSON = CreateDocumentTypePropertyTypeRequestModelFromJSON; exports.CreateDocumentTypePropertyTypeRequestModelFromJSONTyped = CreateDocumentTypePropertyTypeRequestModelFromJSONTyped; exports.CreateDocumentTypePropertyTypeRequestModelToJSON = CreateDocumentTypePropertyTypeRequestModelToJSON; exports.CreateDocumentTypePropertyTypeRequestModelToJSONTyped = CreateDocumentTypePropertyTypeRequestModelToJSONTyped; const PropertyTypeValidationModel_1 = require("./PropertyTypeValidationModel"); const PropertyTypeAppearanceModel_1 = require("./PropertyTypeAppearanceModel"); const ReferenceByIdModel_1 = require("./ReferenceByIdModel"); /** * Check if a given object implements the CreateDocumentTypePropertyTypeRequestModel interface. */ function instanceOfCreateDocumentTypePropertyTypeRequestModel(value) { if (!('id' in value) || value['id'] === undefined) return false; if (!('sortOrder' in value) || value['sortOrder'] === undefined) return false; if (!('alias' in value) || value['alias'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('dataType' in value) || value['dataType'] === undefined) return false; if (!('variesByCulture' in value) || value['variesByCulture'] === undefined) return false; if (!('variesBySegment' in value) || value['variesBySegment'] === undefined) return false; if (!('validation' in value) || value['validation'] === undefined) return false; if (!('appearance' in value) || value['appearance'] === undefined) return false; return true; } function CreateDocumentTypePropertyTypeRequestModelFromJSON(json) { return CreateDocumentTypePropertyTypeRequestModelFromJSONTyped(json, false); } function CreateDocumentTypePropertyTypeRequestModelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'], 'container': json['container'] == null ? undefined : (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['container']), 'sortOrder': json['sortOrder'], 'alias': json['alias'], 'name': json['name'], 'description': json['description'] == null ? undefined : json['description'], 'dataType': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['dataType']), 'variesByCulture': json['variesByCulture'], 'variesBySegment': json['variesBySegment'], 'validation': (0, PropertyTypeValidationModel_1.PropertyTypeValidationModelFromJSON)(json['validation']), 'appearance': (0, PropertyTypeAppearanceModel_1.PropertyTypeAppearanceModelFromJSON)(json['appearance']), }; } function CreateDocumentTypePropertyTypeRequestModelToJSON(json) { return CreateDocumentTypePropertyTypeRequestModelToJSONTyped(json, false); } function CreateDocumentTypePropertyTypeRequestModelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'id': value['id'], 'container': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['container']), 'sortOrder': value['sortOrder'], 'alias': value['alias'], 'name': value['name'], 'description': value['description'], 'dataType': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['dataType']), 'variesByCulture': value['variesByCulture'], 'variesBySegment': value['variesBySegment'], 'validation': (0, PropertyTypeValidationModel_1.PropertyTypeValidationModelToJSON)(value['validation']), 'appearance': (0, PropertyTypeAppearanceModel_1.PropertyTypeAppearanceModelToJSON)(value['appearance']), }; }