umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
60 lines (59 loc) • 2.47 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.instanceOfDictionaryItemResponseModel = instanceOfDictionaryItemResponseModel;
exports.DictionaryItemResponseModelFromJSON = DictionaryItemResponseModelFromJSON;
exports.DictionaryItemResponseModelFromJSONTyped = DictionaryItemResponseModelFromJSONTyped;
exports.DictionaryItemResponseModelToJSON = DictionaryItemResponseModelToJSON;
exports.DictionaryItemResponseModelToJSONTyped = DictionaryItemResponseModelToJSONTyped;
const CreateDictionaryItemRequestModelTranslationsInner_1 = require("./CreateDictionaryItemRequestModelTranslationsInner");
/**
* Check if a given object implements the DictionaryItemResponseModel interface.
*/
function instanceOfDictionaryItemResponseModel(value) {
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('translations' in value) || value['translations'] === undefined)
return false;
if (!('id' in value) || value['id'] === undefined)
return false;
return true;
}
function DictionaryItemResponseModelFromJSON(json) {
return DictionaryItemResponseModelFromJSONTyped(json, false);
}
function DictionaryItemResponseModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'name': json['name'],
'translations': (json['translations'].map(CreateDictionaryItemRequestModelTranslationsInner_1.CreateDictionaryItemRequestModelTranslationsInnerFromJSON)),
'id': json['id'],
};
}
function DictionaryItemResponseModelToJSON(json) {
return DictionaryItemResponseModelToJSONTyped(json, false);
}
function DictionaryItemResponseModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'translations': (value['translations'].map(CreateDictionaryItemRequestModelTranslationsInner_1.CreateDictionaryItemRequestModelTranslationsInnerToJSON)),
'id': value['id'],
};
}