"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSignRequestSignerInputDateAsiaValidationValidationTypeField = serializeSignRequestSignerInputDateAsiaValidationValidationTypeField;
exports.deserializeSignRequestSignerInputDateAsiaValidationValidationTypeField = deserializeSignRequestSignerInputDateAsiaValidationValidationTypeField;
exports.serializeSignRequestSignerInputDateAsiaValidation = serializeSignRequestSignerInputDateAsiaValidation;
exports.deserializeSignRequestSignerInputDateAsiaValidation = deserializeSignRequestSignerInputDateAsiaValidation;
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
const json_2 = require("../serialization/json");
function serializeSignRequestSignerInputDateAsiaValidationValidationTypeField(val) {
    return val;
}
function deserializeSignRequestSignerInputDateAsiaValidationValidationTypeField(val) {
    if (val == 'date_asia') {
        return val;
    }
    if ((0, json_1.sdIsString)(val)) {
        return val;
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize SignRequestSignerInputDateAsiaValidationValidationTypeField",
    });
}
function serializeSignRequestSignerInputDateAsiaValidation(val) {
    return {
        ['validation_type']: val.validationType == void 0
            ? val.validationType
            : serializeSignRequestSignerInputDateAsiaValidationValidationTypeField(val.validationType),
    };
}
function deserializeSignRequestSignerInputDateAsiaValidation(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "SignRequestSignerInputDateAsiaValidation"',
        });
    }
    const validationType = val.validation_type == void 0
        ? void 0
        : deserializeSignRequestSignerInputDateAsiaValidationValidationTypeField(val.validation_type);
    return {
        validationType: validationType,
    };
}
//# sourceMappingURL=signRequestSignerInputDateAsiaValidation.js.map