umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
77 lines (76 loc) • 3.56 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.instanceOfDocumentPropertyValuePermissionPresentationModel = instanceOfDocumentPropertyValuePermissionPresentationModel;
exports.DocumentPropertyValuePermissionPresentationModelFromJSON = DocumentPropertyValuePermissionPresentationModelFromJSON;
exports.DocumentPropertyValuePermissionPresentationModelFromJSONTyped = DocumentPropertyValuePermissionPresentationModelFromJSONTyped;
exports.DocumentPropertyValuePermissionPresentationModelToJSON = DocumentPropertyValuePermissionPresentationModelToJSON;
exports.DocumentPropertyValuePermissionPresentationModelToJSONTyped = DocumentPropertyValuePermissionPresentationModelToJSONTyped;
const ReferenceByIdModel_1 = require("./ReferenceByIdModel");
/**
* Check if a given object implements the DocumentPropertyValuePermissionPresentationModel interface.
*/
function instanceOfDocumentPropertyValuePermissionPresentationModel(value) {
if (!('$type' in value) || value['$type'] === undefined)
return false;
if (!('documentType' in value) || value['documentType'] === undefined)
return false;
if (!('propertyType' in value) || value['propertyType'] === undefined)
return false;
if (!('verbs' in value) || value['verbs'] === undefined)
return false;
return true;
}
function DocumentPropertyValuePermissionPresentationModelFromJSON(json) {
return DocumentPropertyValuePermissionPresentationModelFromJSONTyped(json, false);
}
function DocumentPropertyValuePermissionPresentationModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
if (!ignoreDiscriminator) {
if (json['$type'] === 'DocumentPropertyValuePermissionPresentationModel') {
return DocumentPropertyValuePermissionPresentationModelFromJSONTyped(json, ignoreDiscriminator);
}
}
return {
'$type': json['$type'],
'documentType': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['documentType']),
'propertyType': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['propertyType']),
'verbs': new Set(json['verbs']),
};
}
function DocumentPropertyValuePermissionPresentationModelToJSON(json) {
return DocumentPropertyValuePermissionPresentationModelToJSONTyped(json, false);
}
function DocumentPropertyValuePermissionPresentationModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
if (!ignoreDiscriminator) {
switch (value['$type']) {
case 'DocumentPropertyValuePermissionPresentationModel':
return DocumentPropertyValuePermissionPresentationModelToJSONTyped(value, ignoreDiscriminator);
default:
return value;
}
}
return {
'$type': value['$type'],
'documentType': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['documentType']),
'propertyType': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['propertyType']),
'verbs': Array.from(value['verbs']),
};
}