box-node-sdk
Version:
Official SDK for Box Platform APIs
42 lines • 2.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeEnterpriseConfigurationItemStringV2025R0 = serializeEnterpriseConfigurationItemStringV2025R0;
exports.deserializeEnterpriseConfigurationItemStringV2025R0 = deserializeEnterpriseConfigurationItemStringV2025R0;
const enterpriseConfigurationItemV2025R0_1 = require("./enterpriseConfigurationItemV2025R0");
const errors_1 = require("../../box/errors");
const json_1 = require("../../serialization/json");
const json_2 = require("../../serialization/json");
const json_3 = require("../../serialization/json");
function serializeEnterpriseConfigurationItemStringV2025R0(val) {
const base = (0, enterpriseConfigurationItemV2025R0_1.serializeEnterpriseConfigurationItemV2025R0)(val);
if (!(0, json_3.sdIsMap)(base)) {
throw new errors_1.BoxSdkError({
message: 'Expecting a map for "EnterpriseConfigurationItemStringV2025R0"',
});
}
return Object.assign(Object.assign({}, base), { ['value']: val.value });
}
function deserializeEnterpriseConfigurationItemStringV2025R0(val) {
if (!(0, json_3.sdIsMap)(val)) {
throw new errors_1.BoxSdkError({
message: 'Expecting a map for "EnterpriseConfigurationItemStringV2025R0"',
});
}
if (!(val.value == void 0) && !(0, json_2.sdIsString)(val.value)) {
throw new errors_1.BoxSdkError({
message: 'Expecting string for "value" of type "EnterpriseConfigurationItemStringV2025R0"',
});
}
const value = val.value == void 0 ? void 0 : val.value;
if (!(val.is_used == void 0) && !(0, json_1.sdIsBoolean)(val.is_used)) {
throw new errors_1.BoxSdkError({
message: 'Expecting boolean for "is_used" of type "EnterpriseConfigurationItemStringV2025R0"',
});
}
const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
return {
value: value,
isUsed: isUsed,
};
}
//# sourceMappingURL=enterpriseConfigurationItemStringV2025R0.js.map