umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
70 lines (69 loc) • 2.75 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.instanceOfRedirectUrlResponseModel = instanceOfRedirectUrlResponseModel;
exports.RedirectUrlResponseModelFromJSON = RedirectUrlResponseModelFromJSON;
exports.RedirectUrlResponseModelFromJSONTyped = RedirectUrlResponseModelFromJSONTyped;
exports.RedirectUrlResponseModelToJSON = RedirectUrlResponseModelToJSON;
exports.RedirectUrlResponseModelToJSONTyped = RedirectUrlResponseModelToJSONTyped;
const ReferenceByIdModel_1 = require("./ReferenceByIdModel");
/**
* Check if a given object implements the RedirectUrlResponseModel interface.
*/
function instanceOfRedirectUrlResponseModel(value) {
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('originalUrl' in value) || value['originalUrl'] === undefined)
return false;
if (!('destinationUrl' in value) || value['destinationUrl'] === undefined)
return false;
if (!('created' in value) || value['created'] === undefined)
return false;
if (!('document' in value) || value['document'] === undefined)
return false;
return true;
}
function RedirectUrlResponseModelFromJSON(json) {
return RedirectUrlResponseModelFromJSONTyped(json, false);
}
function RedirectUrlResponseModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'originalUrl': json['originalUrl'],
'destinationUrl': json['destinationUrl'],
'created': (new Date(json['created'])),
'document': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['document']),
'culture': json['culture'] == null ? undefined : json['culture'],
};
}
function RedirectUrlResponseModelToJSON(json) {
return RedirectUrlResponseModelToJSONTyped(json, false);
}
function RedirectUrlResponseModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'originalUrl': value['originalUrl'],
'destinationUrl': value['destinationUrl'],
'created': ((value['created']).toISOString()),
'document': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['document']),
'culture': value['culture'],
};
}