import { BoxSdkError } from '../box/errors.js';
import { sdIsString } from '../serialization/json.js';
export function serializeRetentionPolicyMaxExtensionLengthResponseEnum(val) {
    return val;
}
export function deserializeRetentionPolicyMaxExtensionLengthResponseEnum(val) {
    if (val == 'none') {
        return val;
    }
    if (sdIsString(val)) {
        return val;
    }
    throw new BoxSdkError({
        message: "Can't deserialize RetentionPolicyMaxExtensionLengthResponseEnum",
    });
}
export function serializeRetentionPolicyMaxExtensionLengthResponse(val) {
    if (sdIsString(val)) {
        return val;
    }
    try {
        return serializeRetentionPolicyMaxExtensionLengthResponseEnum(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new BoxSdkError({
        message: "Can't serialize RetentionPolicyMaxExtensionLengthResponse",
    });
}
export function deserializeRetentionPolicyMaxExtensionLengthResponse(val) {
    if (sdIsString(val)) {
        return val;
    }
    try {
        return deserializeRetentionPolicyMaxExtensionLengthResponseEnum(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new BoxSdkError({
        message: "Can't deserialize RetentionPolicyMaxExtensionLengthResponse",
    });
}
//# sourceMappingURL=retentionPolicyMaxExtensionLengthResponse.js.map