umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
61 lines (60 loc) • 2.79 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.instanceOfCreateDictionaryItemRequestModel = instanceOfCreateDictionaryItemRequestModel;
exports.CreateDictionaryItemRequestModelFromJSON = CreateDictionaryItemRequestModelFromJSON;
exports.CreateDictionaryItemRequestModelFromJSONTyped = CreateDictionaryItemRequestModelFromJSONTyped;
exports.CreateDictionaryItemRequestModelToJSON = CreateDictionaryItemRequestModelToJSON;
exports.CreateDictionaryItemRequestModelToJSONTyped = CreateDictionaryItemRequestModelToJSONTyped;
const CreateDictionaryItemRequestModelTranslationsInner_1 = require("./CreateDictionaryItemRequestModelTranslationsInner");
const ReferenceByIdModel_1 = require("./ReferenceByIdModel");
/**
* Check if a given object implements the CreateDictionaryItemRequestModel interface.
*/
function instanceOfCreateDictionaryItemRequestModel(value) {
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('translations' in value) || value['translations'] === undefined)
return false;
return true;
}
function CreateDictionaryItemRequestModelFromJSON(json) {
return CreateDictionaryItemRequestModelFromJSONTyped(json, false);
}
function CreateDictionaryItemRequestModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'name': json['name'],
'translations': (json['translations'].map(CreateDictionaryItemRequestModelTranslationsInner_1.CreateDictionaryItemRequestModelTranslationsInnerFromJSON)),
'id': json['id'] == null ? undefined : json['id'],
'parent': json['parent'] == null ? undefined : (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['parent']),
};
}
function CreateDictionaryItemRequestModelToJSON(json) {
return CreateDictionaryItemRequestModelToJSONTyped(json, false);
}
function CreateDictionaryItemRequestModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'translations': (value['translations'].map(CreateDictionaryItemRequestModelTranslationsInner_1.CreateDictionaryItemRequestModelTranslationsInnerToJSON)),
'id': value['id'],
'parent': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['parent']),
};
}