umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
63 lines (62 loc) • 2.4 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.instanceOfMediaVariantResponseModel = instanceOfMediaVariantResponseModel;
exports.MediaVariantResponseModelFromJSON = MediaVariantResponseModelFromJSON;
exports.MediaVariantResponseModelFromJSONTyped = MediaVariantResponseModelFromJSONTyped;
exports.MediaVariantResponseModelToJSON = MediaVariantResponseModelToJSON;
exports.MediaVariantResponseModelToJSONTyped = MediaVariantResponseModelToJSONTyped;
/**
* Check if a given object implements the MediaVariantResponseModel interface.
*/
function instanceOfMediaVariantResponseModel(value) {
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('createDate' in value) || value['createDate'] === undefined)
return false;
if (!('updateDate' in value) || value['updateDate'] === undefined)
return false;
return true;
}
function MediaVariantResponseModelFromJSON(json) {
return MediaVariantResponseModelFromJSONTyped(json, false);
}
function MediaVariantResponseModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'culture': json['culture'] == null ? undefined : json['culture'],
'segment': json['segment'] == null ? undefined : json['segment'],
'name': json['name'],
'createDate': (new Date(json['createDate'])),
'updateDate': (new Date(json['updateDate'])),
};
}
function MediaVariantResponseModelToJSON(json) {
return MediaVariantResponseModelToJSONTyped(json, false);
}
function MediaVariantResponseModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'culture': value['culture'],
'segment': value['segment'],
'name': value['name'],
'createDate': ((value['createDate']).toISOString()),
'updateDate': ((value['updateDate']).toISOString()),
};
}