"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSignRequestSignerInputValidation = serializeSignRequestSignerInputValidation;
exports.deserializeSignRequestSignerInputValidation = deserializeSignRequestSignerInputValidation;
const signRequestSignerInputEmailValidation_1 = require("./signRequestSignerInputEmailValidation");
const signRequestSignerInputEmailValidation_2 = require("./signRequestSignerInputEmailValidation");
const signRequestSignerInputCustomValidation_1 = require("./signRequestSignerInputCustomValidation");
const signRequestSignerInputCustomValidation_2 = require("./signRequestSignerInputCustomValidation");
const signRequestSignerInputZipValidation_1 = require("./signRequestSignerInputZipValidation");
const signRequestSignerInputZipValidation_2 = require("./signRequestSignerInputZipValidation");
const signRequestSignerInputZip4Validation_1 = require("./signRequestSignerInputZip4Validation");
const signRequestSignerInputZip4Validation_2 = require("./signRequestSignerInputZip4Validation");
const signRequestSignerInputSsnValidation_1 = require("./signRequestSignerInputSsnValidation");
const signRequestSignerInputSsnValidation_2 = require("./signRequestSignerInputSsnValidation");
const signRequestSignerInputNumberWithPeriodValidation_1 = require("./signRequestSignerInputNumberWithPeriodValidation");
const signRequestSignerInputNumberWithPeriodValidation_2 = require("./signRequestSignerInputNumberWithPeriodValidation");
const signRequestSignerInputNumberWithCommaValidation_1 = require("./signRequestSignerInputNumberWithCommaValidation");
const signRequestSignerInputNumberWithCommaValidation_2 = require("./signRequestSignerInputNumberWithCommaValidation");
const signRequestSignerInputDateIsoValidation_1 = require("./signRequestSignerInputDateIsoValidation");
const signRequestSignerInputDateIsoValidation_2 = require("./signRequestSignerInputDateIsoValidation");
const signRequestSignerInputDateUsValidation_1 = require("./signRequestSignerInputDateUsValidation");
const signRequestSignerInputDateUsValidation_2 = require("./signRequestSignerInputDateUsValidation");
const signRequestSignerInputDateEuValidation_1 = require("./signRequestSignerInputDateEuValidation");
const signRequestSignerInputDateEuValidation_2 = require("./signRequestSignerInputDateEuValidation");
const signRequestSignerInputDateAsiaValidation_1 = require("./signRequestSignerInputDateAsiaValidation");
const signRequestSignerInputDateAsiaValidation_2 = require("./signRequestSignerInputDateAsiaValidation");
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
function serializeSignRequestSignerInputValidation(val) {
    try {
        if (val.validationType == void 0) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting "validationType" of type "SignRequestSignerInputEmailValidation" to be defined',
            });
        }
        return (0, signRequestSignerInputEmailValidation_1.serializeSignRequestSignerInputEmailValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        if (val.validationType == void 0) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting "validationType" of type "SignRequestSignerInputCustomValidation" to be defined',
            });
        }
        if (!(val.customRegex == void 0) && !(0, json_1.sdIsString)(val.customRegex)) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting string for "customRegex" of type "SignRequestSignerInputCustomValidation"',
            });
        }
        if (!(val.customErrorMessage == void 0) &&
            !(0, json_1.sdIsString)(val.customErrorMessage)) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting string for "customErrorMessage" of type "SignRequestSignerInputCustomValidation"',
            });
        }
        return (0, signRequestSignerInputCustomValidation_1.serializeSignRequestSignerInputCustomValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        if (val.validationType == void 0) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting "validationType" of type "SignRequestSignerInputZipValidation" to be defined',
            });
        }
        return (0, signRequestSignerInputZipValidation_1.serializeSignRequestSignerInputZipValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        if (val.validationType == void 0) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting "validationType" of type "SignRequestSignerInputZip4Validation" to be defined',
            });
        }
        return (0, signRequestSignerInputZip4Validation_1.serializeSignRequestSignerInputZip4Validation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        if (val.validationType == void 0) {
            throw new errors_1.BoxSdkError({
                message: 'Expecting "validationType" of type "SignRequestSignerInputSsnValidation" to be defined',
            });
        }
        return (0, signRequestSignerInputSsnValidation_1.serializeSignRequestSignerInputSsnValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputNumberWithPeriodValidation_1.serializeSignRequestSignerInputNumberWithPeriodValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputNumberWithCommaValidation_1.serializeSignRequestSignerInputNumberWithCommaValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateIsoValidation_1.serializeSignRequestSignerInputDateIsoValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateUsValidation_1.serializeSignRequestSignerInputDateUsValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateEuValidation_1.serializeSignRequestSignerInputDateEuValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateAsiaValidation_1.serializeSignRequestSignerInputDateAsiaValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new errors_1.BoxSdkError({
        message: "Can't serialize SignRequestSignerInputValidation",
    });
}
function deserializeSignRequestSignerInputValidation(val) {
    try {
        return (0, signRequestSignerInputEmailValidation_2.deserializeSignRequestSignerInputEmailValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputCustomValidation_2.deserializeSignRequestSignerInputCustomValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputZipValidation_2.deserializeSignRequestSignerInputZipValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputZip4Validation_2.deserializeSignRequestSignerInputZip4Validation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputSsnValidation_2.deserializeSignRequestSignerInputSsnValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputNumberWithPeriodValidation_2.deserializeSignRequestSignerInputNumberWithPeriodValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputNumberWithCommaValidation_2.deserializeSignRequestSignerInputNumberWithCommaValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateIsoValidation_2.deserializeSignRequestSignerInputDateIsoValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateUsValidation_2.deserializeSignRequestSignerInputDateUsValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateEuValidation_2.deserializeSignRequestSignerInputDateEuValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    try {
        return (0, signRequestSignerInputDateAsiaValidation_2.deserializeSignRequestSignerInputDateAsiaValidation)(val);
    }
    catch (error) {
        void 0;
    }
    finally {
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize SignRequestSignerInputValidation",
    });
}
//# sourceMappingURL=signRequestSignerInputValidation.js.map