umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
112 lines (111 loc) • 6.63 kB
JavaScript
;
/* 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.instanceOfUpdateDocumentTypeRequestModel = instanceOfUpdateDocumentTypeRequestModel;
exports.UpdateDocumentTypeRequestModelFromJSON = UpdateDocumentTypeRequestModelFromJSON;
exports.UpdateDocumentTypeRequestModelFromJSONTyped = UpdateDocumentTypeRequestModelFromJSONTyped;
exports.UpdateDocumentTypeRequestModelToJSON = UpdateDocumentTypeRequestModelToJSON;
exports.UpdateDocumentTypeRequestModelToJSONTyped = UpdateDocumentTypeRequestModelToJSONTyped;
const DocumentTypeCleanupModel_1 = require("./DocumentTypeCleanupModel");
const PostUserGroupByIdUsersRequestInner_1 = require("./PostUserGroupByIdUsersRequestInner");
const UpdateDocumentTypeRequestModelContainersInner_1 = require("./UpdateDocumentTypeRequestModelContainersInner");
const ReferenceByIdModel_1 = require("./ReferenceByIdModel");
const CreateDocumentTypeRequestModelAllowedDocumentTypesInner_1 = require("./CreateDocumentTypeRequestModelAllowedDocumentTypesInner");
const CreateDocumentTypeRequestModelCompositionsInner_1 = require("./CreateDocumentTypeRequestModelCompositionsInner");
const UpdateDocumentTypeRequestModelPropertiesInner_1 = require("./UpdateDocumentTypeRequestModelPropertiesInner");
/**
* Check if a given object implements the UpdateDocumentTypeRequestModel interface.
*/
function instanceOfUpdateDocumentTypeRequestModel(value) {
if (!('alias' in value) || value['alias'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('icon' in value) || value['icon'] === undefined)
return false;
if (!('allowedAsRoot' in value) || value['allowedAsRoot'] === undefined)
return false;
if (!('variesByCulture' in value) || value['variesByCulture'] === undefined)
return false;
if (!('variesBySegment' in value) || value['variesBySegment'] === undefined)
return false;
if (!('isElement' in value) || value['isElement'] === undefined)
return false;
if (!('properties' in value) || value['properties'] === undefined)
return false;
if (!('containers' in value) || value['containers'] === undefined)
return false;
if (!('allowedTemplates' in value) || value['allowedTemplates'] === undefined)
return false;
if (!('cleanup' in value) || value['cleanup'] === undefined)
return false;
if (!('allowedDocumentTypes' in value) || value['allowedDocumentTypes'] === undefined)
return false;
if (!('compositions' in value) || value['compositions'] === undefined)
return false;
return true;
}
function UpdateDocumentTypeRequestModelFromJSON(json) {
return UpdateDocumentTypeRequestModelFromJSONTyped(json, false);
}
function UpdateDocumentTypeRequestModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'alias': json['alias'],
'name': json['name'],
'description': json['description'] == null ? undefined : json['description'],
'icon': json['icon'],
'allowedAsRoot': json['allowedAsRoot'],
'variesByCulture': json['variesByCulture'],
'variesBySegment': json['variesBySegment'],
'collection': json['collection'] == null ? undefined : (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['collection']),
'isElement': json['isElement'],
'properties': (json['properties'].map(UpdateDocumentTypeRequestModelPropertiesInner_1.UpdateDocumentTypeRequestModelPropertiesInnerFromJSON)),
'containers': (json['containers'].map(UpdateDocumentTypeRequestModelContainersInner_1.UpdateDocumentTypeRequestModelContainersInnerFromJSON)),
'allowedTemplates': (json['allowedTemplates'].map(PostUserGroupByIdUsersRequestInner_1.PostUserGroupByIdUsersRequestInnerFromJSON)),
'defaultTemplate': json['defaultTemplate'] == null ? undefined : (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['defaultTemplate']),
'cleanup': (0, DocumentTypeCleanupModel_1.DocumentTypeCleanupModelFromJSON)(json['cleanup']),
'allowedDocumentTypes': (json['allowedDocumentTypes'].map(CreateDocumentTypeRequestModelAllowedDocumentTypesInner_1.CreateDocumentTypeRequestModelAllowedDocumentTypesInnerFromJSON)),
'compositions': (json['compositions'].map(CreateDocumentTypeRequestModelCompositionsInner_1.CreateDocumentTypeRequestModelCompositionsInnerFromJSON)),
};
}
function UpdateDocumentTypeRequestModelToJSON(json) {
return UpdateDocumentTypeRequestModelToJSONTyped(json, false);
}
function UpdateDocumentTypeRequestModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'alias': value['alias'],
'name': value['name'],
'description': value['description'],
'icon': value['icon'],
'allowedAsRoot': value['allowedAsRoot'],
'variesByCulture': value['variesByCulture'],
'variesBySegment': value['variesBySegment'],
'collection': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['collection']),
'isElement': value['isElement'],
'properties': (value['properties'].map(UpdateDocumentTypeRequestModelPropertiesInner_1.UpdateDocumentTypeRequestModelPropertiesInnerToJSON)),
'containers': (value['containers'].map(UpdateDocumentTypeRequestModelContainersInner_1.UpdateDocumentTypeRequestModelContainersInnerToJSON)),
'allowedTemplates': (value['allowedTemplates'].map(PostUserGroupByIdUsersRequestInner_1.PostUserGroupByIdUsersRequestInnerToJSON)),
'defaultTemplate': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['defaultTemplate']),
'cleanup': (0, DocumentTypeCleanupModel_1.DocumentTypeCleanupModelToJSON)(value['cleanup']),
'allowedDocumentTypes': (value['allowedDocumentTypes'].map(CreateDocumentTypeRequestModelAllowedDocumentTypesInner_1.CreateDocumentTypeRequestModelAllowedDocumentTypesInnerToJSON)),
'compositions': (value['compositions'].map(CreateDocumentTypeRequestModelCompositionsInner_1.CreateDocumentTypeRequestModelCompositionsInnerToJSON)),
};
}