"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.countryCodeEnumFromJSON = exports.countryCodeEnumToJSON = exports.CountryCodeEnum$ = exports.CountryCodeEnum$outboundSchema = exports.CountryCodeEnum$inboundSchema = exports.CountryCodeEnumValue$ = exports.CountryCodeEnumValue$outboundSchema = exports.CountryCodeEnumValue$inboundSchema = exports.countryCodeEnumSourceValueFromJSON = exports.countryCodeEnumSourceValueToJSON = exports.CountryCodeEnumSourceValue$ = exports.CountryCodeEnumSourceValue$outboundSchema = exports.CountryCodeEnumSourceValue$inboundSchema = exports.countryCodeEnum4FromJSON = exports.countryCodeEnum4ToJSON = exports.CountryCodeEnum4$ = exports.CountryCodeEnum4$outboundSchema = exports.CountryCodeEnum4$inboundSchema = exports.CountryCodeEnumValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const enums_js_1 = require("../../types/enums.js");
/**
 * The ISO3166-1 Alpha2 Code of the Country
 */
var CountryCodeEnumValue;
(function (CountryCodeEnumValue) {
    CountryCodeEnumValue["Af"] = "AF";
    CountryCodeEnumValue["Al"] = "AL";
    CountryCodeEnumValue["Dz"] = "DZ";
    CountryCodeEnumValue["As"] = "AS";
    CountryCodeEnumValue["Ad"] = "AD";
    CountryCodeEnumValue["Ao"] = "AO";
    CountryCodeEnumValue["Ai"] = "AI";
    CountryCodeEnumValue["Aq"] = "AQ";
    CountryCodeEnumValue["Ag"] = "AG";
    CountryCodeEnumValue["Ar"] = "AR";
    CountryCodeEnumValue["Am"] = "AM";
    CountryCodeEnumValue["Aw"] = "AW";
    CountryCodeEnumValue["Au"] = "AU";
    CountryCodeEnumValue["At"] = "AT";
    CountryCodeEnumValue["Az"] = "AZ";
    CountryCodeEnumValue["Bs"] = "BS";
    CountryCodeEnumValue["Bh"] = "BH";
    CountryCodeEnumValue["Bd"] = "BD";
    CountryCodeEnumValue["Bb"] = "BB";
    CountryCodeEnumValue["By"] = "BY";
    CountryCodeEnumValue["Be"] = "BE";
    CountryCodeEnumValue["Bz"] = "BZ";
    CountryCodeEnumValue["Bj"] = "BJ";
    CountryCodeEnumValue["Bm"] = "BM";
    CountryCodeEnumValue["Bt"] = "BT";
    CountryCodeEnumValue["Bo"] = "BO";
    CountryCodeEnumValue["Bq"] = "BQ";
    CountryCodeEnumValue["Ba"] = "BA";
    CountryCodeEnumValue["Bw"] = "BW";
    CountryCodeEnumValue["Bv"] = "BV";
    CountryCodeEnumValue["Br"] = "BR";
    CountryCodeEnumValue["Io"] = "IO";
    CountryCodeEnumValue["Bn"] = "BN";
    CountryCodeEnumValue["Bg"] = "BG";
    CountryCodeEnumValue["Bf"] = "BF";
    CountryCodeEnumValue["Bi"] = "BI";
    CountryCodeEnumValue["Kh"] = "KH";
    CountryCodeEnumValue["Cm"] = "CM";
    CountryCodeEnumValue["Ca"] = "CA";
    CountryCodeEnumValue["Cv"] = "CV";
    CountryCodeEnumValue["Ky"] = "KY";
    CountryCodeEnumValue["Cf"] = "CF";
    CountryCodeEnumValue["Td"] = "TD";
    CountryCodeEnumValue["Cl"] = "CL";
    CountryCodeEnumValue["Cn"] = "CN";
    CountryCodeEnumValue["Cx"] = "CX";
    CountryCodeEnumValue["Cc"] = "CC";
    CountryCodeEnumValue["Co"] = "CO";
    CountryCodeEnumValue["Km"] = "KM";
    CountryCodeEnumValue["Cg"] = "CG";
    CountryCodeEnumValue["Cd"] = "CD";
    CountryCodeEnumValue["Ck"] = "CK";
    CountryCodeEnumValue["Cr"] = "CR";
    CountryCodeEnumValue["Hr"] = "HR";
    CountryCodeEnumValue["Cu"] = "CU";
    CountryCodeEnumValue["Cw"] = "CW";
    CountryCodeEnumValue["Cy"] = "CY";
    CountryCodeEnumValue["Cz"] = "CZ";
    CountryCodeEnumValue["Ci"] = "CI";
    CountryCodeEnumValue["Dk"] = "DK";
    CountryCodeEnumValue["Dj"] = "DJ";
    CountryCodeEnumValue["Dm"] = "DM";
    CountryCodeEnumValue["Do"] = "DO";
    CountryCodeEnumValue["Ec"] = "EC";
    CountryCodeEnumValue["Eg"] = "EG";
    CountryCodeEnumValue["Sv"] = "SV";
    CountryCodeEnumValue["Gq"] = "GQ";
    CountryCodeEnumValue["Er"] = "ER";
    CountryCodeEnumValue["Ee"] = "EE";
    CountryCodeEnumValue["Et"] = "ET";
    CountryCodeEnumValue["Fk"] = "FK";
    CountryCodeEnumValue["Fo"] = "FO";
    CountryCodeEnumValue["Fj"] = "FJ";
    CountryCodeEnumValue["Fi"] = "FI";
    CountryCodeEnumValue["Fr"] = "FR";
    CountryCodeEnumValue["Gf"] = "GF";
    CountryCodeEnumValue["Pf"] = "PF";
    CountryCodeEnumValue["Tf"] = "TF";
    CountryCodeEnumValue["Ga"] = "GA";
    CountryCodeEnumValue["Gm"] = "GM";
    CountryCodeEnumValue["Ge"] = "GE";
    CountryCodeEnumValue["De"] = "DE";
    CountryCodeEnumValue["Gh"] = "GH";
    CountryCodeEnumValue["Gi"] = "GI";
    CountryCodeEnumValue["Gr"] = "GR";
    CountryCodeEnumValue["Gl"] = "GL";
    CountryCodeEnumValue["Gd"] = "GD";
    CountryCodeEnumValue["Gp"] = "GP";
    CountryCodeEnumValue["Gu"] = "GU";
    CountryCodeEnumValue["Gt"] = "GT";
    CountryCodeEnumValue["Gg"] = "GG";
    CountryCodeEnumValue["Gn"] = "GN";
    CountryCodeEnumValue["Gw"] = "GW";
    CountryCodeEnumValue["Gy"] = "GY";
    CountryCodeEnumValue["Ht"] = "HT";
    CountryCodeEnumValue["Hm"] = "HM";
    CountryCodeEnumValue["Va"] = "VA";
    CountryCodeEnumValue["Hn"] = "HN";
    CountryCodeEnumValue["Hk"] = "HK";
    CountryCodeEnumValue["Hu"] = "HU";
    CountryCodeEnumValue["Is"] = "IS";
    CountryCodeEnumValue["In"] = "IN";
    CountryCodeEnumValue["Id"] = "ID";
    CountryCodeEnumValue["Ir"] = "IR";
    CountryCodeEnumValue["Iq"] = "IQ";
    CountryCodeEnumValue["Ie"] = "IE";
    CountryCodeEnumValue["Im"] = "IM";
    CountryCodeEnumValue["Il"] = "IL";
    CountryCodeEnumValue["It"] = "IT";
    CountryCodeEnumValue["Jm"] = "JM";
    CountryCodeEnumValue["Jp"] = "JP";
    CountryCodeEnumValue["Je"] = "JE";
    CountryCodeEnumValue["Jo"] = "JO";
    CountryCodeEnumValue["Kz"] = "KZ";
    CountryCodeEnumValue["Ke"] = "KE";
    CountryCodeEnumValue["Ki"] = "KI";
    CountryCodeEnumValue["Kp"] = "KP";
    CountryCodeEnumValue["Kr"] = "KR";
    CountryCodeEnumValue["Kw"] = "KW";
    CountryCodeEnumValue["Kg"] = "KG";
    CountryCodeEnumValue["La"] = "LA";
    CountryCodeEnumValue["Lv"] = "LV";
    CountryCodeEnumValue["Lb"] = "LB";
    CountryCodeEnumValue["Ls"] = "LS";
    CountryCodeEnumValue["Lr"] = "LR";
    CountryCodeEnumValue["Ly"] = "LY";
    CountryCodeEnumValue["Li"] = "LI";
    CountryCodeEnumValue["Lt"] = "LT";
    CountryCodeEnumValue["Lu"] = "LU";
    CountryCodeEnumValue["Mo"] = "MO";
    CountryCodeEnumValue["Mk"] = "MK";
    CountryCodeEnumValue["Mg"] = "MG";
    CountryCodeEnumValue["Mw"] = "MW";
    CountryCodeEnumValue["My"] = "MY";
    CountryCodeEnumValue["Mv"] = "MV";
    CountryCodeEnumValue["Ml"] = "ML";
    CountryCodeEnumValue["Mt"] = "MT";
    CountryCodeEnumValue["Mh"] = "MH";
    CountryCodeEnumValue["Mq"] = "MQ";
    CountryCodeEnumValue["Mr"] = "MR";
    CountryCodeEnumValue["Mu"] = "MU";
    CountryCodeEnumValue["Yt"] = "YT";
    CountryCodeEnumValue["Mx"] = "MX";
    CountryCodeEnumValue["Fm"] = "FM";
    CountryCodeEnumValue["Md"] = "MD";
    CountryCodeEnumValue["Mc"] = "MC";
    CountryCodeEnumValue["Mn"] = "MN";
    CountryCodeEnumValue["Me"] = "ME";
    CountryCodeEnumValue["Ms"] = "MS";
    CountryCodeEnumValue["Ma"] = "MA";
    CountryCodeEnumValue["Mz"] = "MZ";
    CountryCodeEnumValue["Mm"] = "MM";
    CountryCodeEnumValue["Na"] = "NA";
    CountryCodeEnumValue["Nr"] = "NR";
    CountryCodeEnumValue["Np"] = "NP";
    CountryCodeEnumValue["Nl"] = "NL";
    CountryCodeEnumValue["Nc"] = "NC";
    CountryCodeEnumValue["Nz"] = "NZ";
    CountryCodeEnumValue["Ni"] = "NI";
    CountryCodeEnumValue["Ne"] = "NE";
    CountryCodeEnumValue["Ng"] = "NG";
    CountryCodeEnumValue["Nu"] = "NU";
    CountryCodeEnumValue["Nf"] = "NF";
    CountryCodeEnumValue["Mp"] = "MP";
    CountryCodeEnumValue["No"] = "NO";
    CountryCodeEnumValue["Om"] = "OM";
    CountryCodeEnumValue["Pk"] = "PK";
    CountryCodeEnumValue["Pw"] = "PW";
    CountryCodeEnumValue["Ps"] = "PS";
    CountryCodeEnumValue["Pa"] = "PA";
    CountryCodeEnumValue["Pg"] = "PG";
    CountryCodeEnumValue["Py"] = "PY";
    CountryCodeEnumValue["Pe"] = "PE";
    CountryCodeEnumValue["Ph"] = "PH";
    CountryCodeEnumValue["Pn"] = "PN";
    CountryCodeEnumValue["Pl"] = "PL";
    CountryCodeEnumValue["Pt"] = "PT";
    CountryCodeEnumValue["Pr"] = "PR";
    CountryCodeEnumValue["Qa"] = "QA";
    CountryCodeEnumValue["Ro"] = "RO";
    CountryCodeEnumValue["Ru"] = "RU";
    CountryCodeEnumValue["Rw"] = "RW";
    CountryCodeEnumValue["Re"] = "RE";
    CountryCodeEnumValue["Bl"] = "BL";
    CountryCodeEnumValue["Sh"] = "SH";
    CountryCodeEnumValue["Kn"] = "KN";
    CountryCodeEnumValue["Lc"] = "LC";
    CountryCodeEnumValue["Mf"] = "MF";
    CountryCodeEnumValue["Pm"] = "PM";
    CountryCodeEnumValue["Vc"] = "VC";
    CountryCodeEnumValue["Ws"] = "WS";
    CountryCodeEnumValue["Sm"] = "SM";
    CountryCodeEnumValue["St"] = "ST";
    CountryCodeEnumValue["Sa"] = "SA";
    CountryCodeEnumValue["Sn"] = "SN";
    CountryCodeEnumValue["Rs"] = "RS";
    CountryCodeEnumValue["Sc"] = "SC";
    CountryCodeEnumValue["Sl"] = "SL";
    CountryCodeEnumValue["Sg"] = "SG";
    CountryCodeEnumValue["Sx"] = "SX";
    CountryCodeEnumValue["Sk"] = "SK";
    CountryCodeEnumValue["Si"] = "SI";
    CountryCodeEnumValue["Sb"] = "SB";
    CountryCodeEnumValue["So"] = "SO";
    CountryCodeEnumValue["Za"] = "ZA";
    CountryCodeEnumValue["Gs"] = "GS";
    CountryCodeEnumValue["Ss"] = "SS";
    CountryCodeEnumValue["Es"] = "ES";
    CountryCodeEnumValue["Lk"] = "LK";
    CountryCodeEnumValue["Sd"] = "SD";
    CountryCodeEnumValue["Sr"] = "SR";
    CountryCodeEnumValue["Sj"] = "SJ";
    CountryCodeEnumValue["Sz"] = "SZ";
    CountryCodeEnumValue["Se"] = "SE";
    CountryCodeEnumValue["Ch"] = "CH";
    CountryCodeEnumValue["Sy"] = "SY";
    CountryCodeEnumValue["Tw"] = "TW";
    CountryCodeEnumValue["Tj"] = "TJ";
    CountryCodeEnumValue["Tz"] = "TZ";
    CountryCodeEnumValue["Th"] = "TH";
    CountryCodeEnumValue["Tl"] = "TL";
    CountryCodeEnumValue["Tg"] = "TG";
    CountryCodeEnumValue["Tk"] = "TK";
    CountryCodeEnumValue["To"] = "TO";
    CountryCodeEnumValue["Tt"] = "TT";
    CountryCodeEnumValue["Tn"] = "TN";
    CountryCodeEnumValue["Tr"] = "TR";
    CountryCodeEnumValue["Tm"] = "TM";
    CountryCodeEnumValue["Tc"] = "TC";
    CountryCodeEnumValue["Tv"] = "TV";
    CountryCodeEnumValue["Ug"] = "UG";
    CountryCodeEnumValue["Ua"] = "UA";
    CountryCodeEnumValue["Ae"] = "AE";
    CountryCodeEnumValue["Gb"] = "GB";
    CountryCodeEnumValue["Us"] = "US";
    CountryCodeEnumValue["Um"] = "UM";
    CountryCodeEnumValue["Uy"] = "UY";
    CountryCodeEnumValue["Uz"] = "UZ";
    CountryCodeEnumValue["Vu"] = "VU";
    CountryCodeEnumValue["Ve"] = "VE";
    CountryCodeEnumValue["Vn"] = "VN";
    CountryCodeEnumValue["Vg"] = "VG";
    CountryCodeEnumValue["Vi"] = "VI";
    CountryCodeEnumValue["Wf"] = "WF";
    CountryCodeEnumValue["Eh"] = "EH";
    CountryCodeEnumValue["Ye"] = "YE";
    CountryCodeEnumValue["Zm"] = "ZM";
    CountryCodeEnumValue["Zw"] = "ZW";
    CountryCodeEnumValue["UnmappedValue"] = "unmapped_value";
})(CountryCodeEnumValue || (exports.CountryCodeEnumValue = CountryCodeEnumValue = {}));
/** @internal */
exports.CountryCodeEnum4$inboundSchema = z.object({});
/** @internal */
exports.CountryCodeEnum4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CountryCodeEnum4$;
(function (CountryCodeEnum4$) {
    /** @deprecated use `CountryCodeEnum4$inboundSchema` instead. */
    CountryCodeEnum4$.inboundSchema = exports.CountryCodeEnum4$inboundSchema;
    /** @deprecated use `CountryCodeEnum4$outboundSchema` instead. */
    CountryCodeEnum4$.outboundSchema = exports.CountryCodeEnum4$outboundSchema;
})(CountryCodeEnum4$ || (exports.CountryCodeEnum4$ = CountryCodeEnum4$ = {}));
function countryCodeEnum4ToJSON(countryCodeEnum4) {
    return JSON.stringify(exports.CountryCodeEnum4$outboundSchema.parse(countryCodeEnum4));
}
exports.countryCodeEnum4ToJSON = countryCodeEnum4ToJSON;
function countryCodeEnum4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CountryCodeEnum4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CountryCodeEnum4' from JSON`);
}
exports.countryCodeEnum4FromJSON = countryCodeEnum4FromJSON;
/** @internal */
exports.CountryCodeEnumSourceValue$inboundSchema = z.union([
    z.lazy(() => exports.CountryCodeEnum4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.CountryCodeEnumSourceValue$outboundSchema = z.union([
    z.lazy(() => exports.CountryCodeEnum4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CountryCodeEnumSourceValue$;
(function (CountryCodeEnumSourceValue$) {
    /** @deprecated use `CountryCodeEnumSourceValue$inboundSchema` instead. */
    CountryCodeEnumSourceValue$.inboundSchema = exports.CountryCodeEnumSourceValue$inboundSchema;
    /** @deprecated use `CountryCodeEnumSourceValue$outboundSchema` instead. */
    CountryCodeEnumSourceValue$.outboundSchema = exports.CountryCodeEnumSourceValue$outboundSchema;
})(CountryCodeEnumSourceValue$ || (exports.CountryCodeEnumSourceValue$ = CountryCodeEnumSourceValue$ = {}));
function countryCodeEnumSourceValueToJSON(countryCodeEnumSourceValue) {
    return JSON.stringify(exports.CountryCodeEnumSourceValue$outboundSchema.parse(countryCodeEnumSourceValue));
}
exports.countryCodeEnumSourceValueToJSON = countryCodeEnumSourceValueToJSON;
function countryCodeEnumSourceValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CountryCodeEnumSourceValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CountryCodeEnumSourceValue' from JSON`);
}
exports.countryCodeEnumSourceValueFromJSON = countryCodeEnumSourceValueFromJSON;
/** @internal */
exports.CountryCodeEnumValue$inboundSchema = z
    .union([
    z.nativeEnum(CountryCodeEnumValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.CountryCodeEnumValue$outboundSchema = z.union([
    z.nativeEnum(CountryCodeEnumValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CountryCodeEnumValue$;
(function (CountryCodeEnumValue$) {
    /** @deprecated use `CountryCodeEnumValue$inboundSchema` instead. */
    CountryCodeEnumValue$.inboundSchema = exports.CountryCodeEnumValue$inboundSchema;
    /** @deprecated use `CountryCodeEnumValue$outboundSchema` instead. */
    CountryCodeEnumValue$.outboundSchema = exports.CountryCodeEnumValue$outboundSchema;
})(CountryCodeEnumValue$ || (exports.CountryCodeEnumValue$ = CountryCodeEnumValue$ = {}));
/** @internal */
exports.CountryCodeEnum$inboundSchema = z.object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.CountryCodeEnum4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.CountryCodeEnumValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.CountryCodeEnum$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.CountryCodeEnum4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.CountryCodeEnumValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CountryCodeEnum$;
(function (CountryCodeEnum$) {
    /** @deprecated use `CountryCodeEnum$inboundSchema` instead. */
    CountryCodeEnum$.inboundSchema = exports.CountryCodeEnum$inboundSchema;
    /** @deprecated use `CountryCodeEnum$outboundSchema` instead. */
    CountryCodeEnum$.outboundSchema = exports.CountryCodeEnum$outboundSchema;
})(CountryCodeEnum$ || (exports.CountryCodeEnum$ = CountryCodeEnum$ = {}));
function countryCodeEnumToJSON(countryCodeEnum) {
    return JSON.stringify(exports.CountryCodeEnum$outboundSchema.parse(countryCodeEnum));
}
exports.countryCodeEnumToJSON = countryCodeEnumToJSON;
function countryCodeEnumFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CountryCodeEnum$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CountryCodeEnum' from JSON`);
}
exports.countryCodeEnumFromJSON = countryCodeEnumFromJSON;
//# sourceMappingURL=countrycodeenum.js.map