"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSignRequestSignerInputDateIsoValidationValidationTypeField = serializeSignRequestSignerInputDateIsoValidationValidationTypeField;
exports.deserializeSignRequestSignerInputDateIsoValidationValidationTypeField = deserializeSignRequestSignerInputDateIsoValidationValidationTypeField;
exports.serializeSignRequestSignerInputDateIsoValidation = serializeSignRequestSignerInputDateIsoValidation;
exports.deserializeSignRequestSignerInputDateIsoValidation = deserializeSignRequestSignerInputDateIsoValidation;
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
const json_2 = require("../serialization/json");
function serializeSignRequestSignerInputDateIsoValidationValidationTypeField(val) {
    return val;
}
function deserializeSignRequestSignerInputDateIsoValidationValidationTypeField(val) {
    if (val == 'date_iso') {
        return val;
    }
    if ((0, json_1.sdIsString)(val)) {
        return val;
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize SignRequestSignerInputDateIsoValidationValidationTypeField",
    });
}
function serializeSignRequestSignerInputDateIsoValidation(val) {
    return {
        ['validation_type']: val.validationType == void 0
            ? val.validationType
            : serializeSignRequestSignerInputDateIsoValidationValidationTypeField(val.validationType),
    };
}
function deserializeSignRequestSignerInputDateIsoValidation(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "SignRequestSignerInputDateIsoValidation"',
        });
    }
    const validationType = val.validation_type == void 0
        ? void 0
        : deserializeSignRequestSignerInputDateIsoValidationValidationTypeField(val.validation_type);
    return {
        validationType: validationType,
    };
}
//# sourceMappingURL=signRequestSignerInputDateIsoValidation.js.map