import { BoxSdkError } from '../box/errors.js';
import { sdIsNumber } from '../serialization/json.js';
import { sdIsString } from '../serialization/json.js';
export function serializeRetentionPolicyMaxExtensionLengthRequestEnum(val) {
    return val;
}
export function deserializeRetentionPolicyMaxExtensionLengthRequestEnum(val) {
    if (val == 'none') {
        return val;
    }
    if (sdIsString(val)) {
        return val;
    }
    throw new BoxSdkError({
        message: "Can't deserialize RetentionPolicyMaxExtensionLengthRequestEnum",
    });
}
export function serializeRetentionPolicyMaxExtensionLengthRequest(val) {
    if (sdIsString(val)) {
        return val;
    }
    if (sdIsNumber(val)) {
        return val;
    }
    try {
        return serializeRetentionPolicyMaxExtensionLengthRequestEnum(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new BoxSdkError({
        message: "Can't serialize RetentionPolicyMaxExtensionLengthRequest",
    });
}
export function deserializeRetentionPolicyMaxExtensionLengthRequest(val) {
    if (sdIsString(val)) {
        return val;
    }
    if (sdIsNumber(val)) {
        return val;
    }
    try {
        return deserializeRetentionPolicyMaxExtensionLengthRequestEnum(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new BoxSdkError({
        message: "Can't deserialize RetentionPolicyMaxExtensionLengthRequest",
    });
}
//# sourceMappingURL=retentionPolicyMaxExtensionLengthRequest.js.map