umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
62 lines (61 loc) • 2.25 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.instanceOfScriptResponseModel = instanceOfScriptResponseModel;
exports.ScriptResponseModelFromJSON = ScriptResponseModelFromJSON;
exports.ScriptResponseModelFromJSONTyped = ScriptResponseModelFromJSONTyped;
exports.ScriptResponseModelToJSON = ScriptResponseModelToJSON;
exports.ScriptResponseModelToJSONTyped = ScriptResponseModelToJSONTyped;
const FileSystemFolderModel_1 = require("./FileSystemFolderModel");
/**
* Check if a given object implements the ScriptResponseModel interface.
*/
function instanceOfScriptResponseModel(value) {
if (!('path' in value) || value['path'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('content' in value) || value['content'] === undefined)
return false;
return true;
}
function ScriptResponseModelFromJSON(json) {
return ScriptResponseModelFromJSONTyped(json, false);
}
function ScriptResponseModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'path': json['path'],
'name': json['name'],
'parent': json['parent'] == null ? undefined : (0, FileSystemFolderModel_1.FileSystemFolderModelFromJSON)(json['parent']),
'content': json['content'],
};
}
function ScriptResponseModelToJSON(json) {
return ScriptResponseModelToJSONTyped(json, false);
}
function ScriptResponseModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'path': value['path'],
'name': value['name'],
'parent': (0, FileSystemFolderModel_1.FileSystemFolderModelToJSON)(value['parent']),
'content': value['content'],
};
}