umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
66 lines (65 loc) • 3.46 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.instanceOfCreateDocumentBlueprintRequestModel = instanceOfCreateDocumentBlueprintRequestModel;
exports.CreateDocumentBlueprintRequestModelFromJSON = CreateDocumentBlueprintRequestModelFromJSON;
exports.CreateDocumentBlueprintRequestModelFromJSONTyped = CreateDocumentBlueprintRequestModelFromJSONTyped;
exports.CreateDocumentBlueprintRequestModelToJSON = CreateDocumentBlueprintRequestModelToJSON;
exports.CreateDocumentBlueprintRequestModelToJSONTyped = CreateDocumentBlueprintRequestModelToJSONTyped;
const CreateDocumentBlueprintRequestModelVariantsInner_1 = require("./CreateDocumentBlueprintRequestModelVariantsInner");
const CreateDocumentBlueprintRequestModelValuesInner_1 = require("./CreateDocumentBlueprintRequestModelValuesInner");
const ReferenceByIdModel_1 = require("./ReferenceByIdModel");
/**
* Check if a given object implements the CreateDocumentBlueprintRequestModel interface.
*/
function instanceOfCreateDocumentBlueprintRequestModel(value) {
if (!('values' in value) || value['values'] === undefined)
return false;
if (!('variants' in value) || value['variants'] === undefined)
return false;
if (!('documentType' in value) || value['documentType'] === undefined)
return false;
return true;
}
function CreateDocumentBlueprintRequestModelFromJSON(json) {
return CreateDocumentBlueprintRequestModelFromJSONTyped(json, false);
}
function CreateDocumentBlueprintRequestModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'values': (json['values'].map(CreateDocumentBlueprintRequestModelValuesInner_1.CreateDocumentBlueprintRequestModelValuesInnerFromJSON)),
'variants': (json['variants'].map(CreateDocumentBlueprintRequestModelVariantsInner_1.CreateDocumentBlueprintRequestModelVariantsInnerFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
'parent': json['parent'] == null ? undefined : (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['parent']),
'documentType': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['documentType']),
};
}
function CreateDocumentBlueprintRequestModelToJSON(json) {
return CreateDocumentBlueprintRequestModelToJSONTyped(json, false);
}
function CreateDocumentBlueprintRequestModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'values': (value['values'].map(CreateDocumentBlueprintRequestModelValuesInner_1.CreateDocumentBlueprintRequestModelValuesInnerToJSON)),
'variants': (value['variants'].map(CreateDocumentBlueprintRequestModelVariantsInner_1.CreateDocumentBlueprintRequestModelVariantsInnerToJSON)),
'id': value['id'],
'parent': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['parent']),
'documentType': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['documentType']),
};
}