"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeRetentionPolicyMaxExtensionLengthRequestEnum = serializeRetentionPolicyMaxExtensionLengthRequestEnum;
exports.deserializeRetentionPolicyMaxExtensionLengthRequestEnum = deserializeRetentionPolicyMaxExtensionLengthRequestEnum;
exports.serializeRetentionPolicyMaxExtensionLengthRequest = serializeRetentionPolicyMaxExtensionLengthRequest;
exports.deserializeRetentionPolicyMaxExtensionLengthRequest = deserializeRetentionPolicyMaxExtensionLengthRequest;
const errors_1 = require("../box/errors.js");
const json_1 = require("../serialization/json.js");
const json_2 = require("../serialization/json.js");
function serializeRetentionPolicyMaxExtensionLengthRequestEnum(val) {
    return val;
}
function deserializeRetentionPolicyMaxExtensionLengthRequestEnum(val) {
    if (val == 'none') {
        return val;
    }
    if ((0, json_2.sdIsString)(val)) {
        return val;
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize RetentionPolicyMaxExtensionLengthRequestEnum",
    });
}
function serializeRetentionPolicyMaxExtensionLengthRequest(val) {
    if ((0, json_2.sdIsString)(val)) {
        return val;
    }
    if ((0, json_1.sdIsNumber)(val)) {
        return val;
    }
    try {
        return serializeRetentionPolicyMaxExtensionLengthRequestEnum(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new errors_1.BoxSdkError({
        message: "Can't serialize RetentionPolicyMaxExtensionLengthRequest",
    });
}
function deserializeRetentionPolicyMaxExtensionLengthRequest(val) {
    if ((0, json_2.sdIsString)(val)) {
        return val;
    }
    if ((0, json_1.sdIsNumber)(val)) {
        return val;
    }
    try {
        return deserializeRetentionPolicyMaxExtensionLengthRequestEnum(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize RetentionPolicyMaxExtensionLengthRequest",
    });
}
//# sourceMappingURL=retentionPolicyMaxExtensionLengthRequest.js.map