umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
57 lines (56 loc) • 2.22 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.instanceOfPropertyTypeValidationModel = instanceOfPropertyTypeValidationModel;
exports.PropertyTypeValidationModelFromJSON = PropertyTypeValidationModelFromJSON;
exports.PropertyTypeValidationModelFromJSONTyped = PropertyTypeValidationModelFromJSONTyped;
exports.PropertyTypeValidationModelToJSON = PropertyTypeValidationModelToJSON;
exports.PropertyTypeValidationModelToJSONTyped = PropertyTypeValidationModelToJSONTyped;
/**
* Check if a given object implements the PropertyTypeValidationModel interface.
*/
function instanceOfPropertyTypeValidationModel(value) {
if (!('mandatory' in value) || value['mandatory'] === undefined)
return false;
return true;
}
function PropertyTypeValidationModelFromJSON(json) {
return PropertyTypeValidationModelFromJSONTyped(json, false);
}
function PropertyTypeValidationModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'mandatory': json['mandatory'],
'mandatoryMessage': json['mandatoryMessage'] == null ? undefined : json['mandatoryMessage'],
'regEx': json['regEx'] == null ? undefined : json['regEx'],
'regExMessage': json['regExMessage'] == null ? undefined : json['regExMessage'],
};
}
function PropertyTypeValidationModelToJSON(json) {
return PropertyTypeValidationModelToJSONTyped(json, false);
}
function PropertyTypeValidationModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'mandatory': value['mandatory'],
'mandatoryMessage': value['mandatoryMessage'],
'regEx': value['regEx'],
'regExMessage': value['regExMessage'],
};
}