umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
76 lines (75 loc) • 2.95 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.instanceOfWebhookResponseModel = instanceOfWebhookResponseModel;
exports.WebhookResponseModelFromJSON = WebhookResponseModelFromJSON;
exports.WebhookResponseModelFromJSONTyped = WebhookResponseModelFromJSONTyped;
exports.WebhookResponseModelToJSON = WebhookResponseModelToJSON;
exports.WebhookResponseModelToJSONTyped = WebhookResponseModelToJSONTyped;
const WebhookResponseModelEventsInner_1 = require("./WebhookResponseModelEventsInner");
/**
* Check if a given object implements the WebhookResponseModel interface.
*/
function instanceOfWebhookResponseModel(value) {
if (!('enabled' in value) || value['enabled'] === undefined)
return false;
if (!('url' in value) || value['url'] === undefined)
return false;
if (!('contentTypeKeys' in value) || value['contentTypeKeys'] === undefined)
return false;
if (!('headers' in value) || value['headers'] === undefined)
return false;
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('events' in value) || value['events'] === undefined)
return false;
return true;
}
function WebhookResponseModelFromJSON(json) {
return WebhookResponseModelFromJSONTyped(json, false);
}
function WebhookResponseModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'enabled': json['enabled'],
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'url': json['url'],
'contentTypeKeys': json['contentTypeKeys'],
'headers': json['headers'],
'id': json['id'],
'events': (json['events'].map(WebhookResponseModelEventsInner_1.WebhookResponseModelEventsInnerFromJSON)),
};
}
function WebhookResponseModelToJSON(json) {
return WebhookResponseModelToJSONTyped(json, false);
}
function WebhookResponseModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'enabled': value['enabled'],
'name': value['name'],
'description': value['description'],
'url': value['url'],
'contentTypeKeys': value['contentTypeKeys'],
'headers': value['headers'],
'id': value['id'],
'events': (value['events'].map(WebhookResponseModelEventsInner_1.WebhookResponseModelEventsInnerToJSON)),
};
}