"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField = serializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField;
exports.deserializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField = deserializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField;
exports.serializeSignRequestSignerInputNumberWithPeriodValidation = serializeSignRequestSignerInputNumberWithPeriodValidation;
exports.deserializeSignRequestSignerInputNumberWithPeriodValidation = deserializeSignRequestSignerInputNumberWithPeriodValidation;
const errors_1 = require("../box/errors");
const json_1 = require("../serialization/json");
const json_2 = require("../serialization/json");
function serializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField(val) {
    return val;
}
function deserializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField(val) {
    if (val == 'number_with_period') {
        return val;
    }
    if ((0, json_1.sdIsString)(val)) {
        return val;
    }
    throw new errors_1.BoxSdkError({
        message: "Can't deserialize SignRequestSignerInputNumberWithPeriodValidationValidationTypeField",
    });
}
function serializeSignRequestSignerInputNumberWithPeriodValidation(val) {
    return {
        ['validation_type']: val.validationType == void 0
            ? val.validationType
            : serializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField(val.validationType),
    };
}
function deserializeSignRequestSignerInputNumberWithPeriodValidation(val) {
    if (!(0, json_2.sdIsMap)(val)) {
        throw new errors_1.BoxSdkError({
            message: 'Expecting a map for "SignRequestSignerInputNumberWithPeriodValidation"',
        });
    }
    const validationType = val.validation_type == void 0
        ? void 0
        : deserializeSignRequestSignerInputNumberWithPeriodValidationValidationTypeField(val.validation_type);
    return {
        validationType: validationType,
    };
}
//# sourceMappingURL=signRequestSignerInputNumberWithPeriodValidation.js.map