UNPKG

umbraco-management-api-client

Version:

TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)

73 lines (72 loc) 2.95 kB
"use strict"; /* 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.instanceOfDocumentPermissionPresentationModel = instanceOfDocumentPermissionPresentationModel; exports.DocumentPermissionPresentationModelFromJSON = DocumentPermissionPresentationModelFromJSON; exports.DocumentPermissionPresentationModelFromJSONTyped = DocumentPermissionPresentationModelFromJSONTyped; exports.DocumentPermissionPresentationModelToJSON = DocumentPermissionPresentationModelToJSON; exports.DocumentPermissionPresentationModelToJSONTyped = DocumentPermissionPresentationModelToJSONTyped; const ReferenceByIdModel_1 = require("./ReferenceByIdModel"); /** * Check if a given object implements the DocumentPermissionPresentationModel interface. */ function instanceOfDocumentPermissionPresentationModel(value) { if (!('$type' in value) || value['$type'] === undefined) return false; if (!('document' in value) || value['document'] === undefined) return false; if (!('verbs' in value) || value['verbs'] === undefined) return false; return true; } function DocumentPermissionPresentationModelFromJSON(json) { return DocumentPermissionPresentationModelFromJSONTyped(json, false); } function DocumentPermissionPresentationModelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } if (!ignoreDiscriminator) { if (json['$type'] === 'DocumentPermissionPresentationModel') { return DocumentPermissionPresentationModelFromJSONTyped(json, ignoreDiscriminator); } } return { '$type': json['$type'], 'document': (0, ReferenceByIdModel_1.ReferenceByIdModelFromJSON)(json['document']), 'verbs': new Set(json['verbs']), }; } function DocumentPermissionPresentationModelToJSON(json) { return DocumentPermissionPresentationModelToJSONTyped(json, false); } function DocumentPermissionPresentationModelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } if (!ignoreDiscriminator) { switch (value['$type']) { case 'DocumentPermissionPresentationModel': return DocumentPermissionPresentationModelToJSONTyped(value, ignoreDiscriminator); default: return value; } } return { '$type': value['$type'], 'document': (0, ReferenceByIdModel_1.ReferenceByIdModelToJSON)(value['document']), 'verbs': Array.from(value['verbs']), }; }