"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSignRequestSignerInputDateUsValidationValidationTypeField = serializeSignRequestSignerInputDateUsValidationValidationTypeField;
exports.deserializeSignRequestSignerInputDateUsValidationValidationTypeField = deserializeSignRequestSignerInputDateUsValidationValidationTypeField;
exports.serializeSignRequestSignerInputDateUsValidation = serializeSignRequestSignerInputDateUsValidation;
exports.deserializeSignRequestSignerInputDateUsValidation = deserializeSignRequestSignerInputDateUsValidation;
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
const json_2 = require("../serialization/json");
function serializeSignRequestSignerInputDateUsValidationValidationTypeField(val) {
    return val;
}
function deserializeSignRequestSignerInputDateUsValidationValidationTypeField(val) {
    if (val == 'date_us') {
        return val;
    }
    if ((0, json_1.sdIsString)(val)) {
        return val;
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize SignRequestSignerInputDateUsValidationValidationTypeField",
    });
}
function serializeSignRequestSignerInputDateUsValidation(val) {
    return {
        ['validation_type']: val.validationType == void 0
            ? val.validationType
            : serializeSignRequestSignerInputDateUsValidationValidationTypeField(val.validationType),
    };
}
function deserializeSignRequestSignerInputDateUsValidation(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "SignRequestSignerInputDateUsValidation"',
        });
    }
    const validationType = val.validation_type == void 0
        ? void 0
        : deserializeSignRequestSignerInputDateUsValidationValidationTypeField(val.validation_type);
    return {
        validationType: validationType,
    };
}
//# sourceMappingURL=signRequestSignerInputDateUsValidation.js.map