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