"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountingTaxRateResult$ = exports.AccountingTaxRateResult$outboundSchema = exports.AccountingTaxRateResult$inboundSchema = exports.AccountingTaxRateResultData$ = exports.AccountingTaxRateResultData$outboundSchema = exports.AccountingTaxRateResultData$inboundSchema = exports.AccountingTaxRateResultActive$ = exports.AccountingTaxRateResultActive$outboundSchema = exports.AccountingTaxRateResultActive$inboundSchema = exports.AccountingTaxRateResult2$ = exports.AccountingTaxRateResult2$outboundSchema = exports.AccountingTaxRateResult2$inboundSchema = exports.AccountingTaxRateResult2 = void 0;
exports.accountingTaxRateResultActiveToJSON = accountingTaxRateResultActiveToJSON;
exports.accountingTaxRateResultActiveFromJSON = accountingTaxRateResultActiveFromJSON;
exports.accountingTaxRateResultDataToJSON = accountingTaxRateResultDataToJSON;
exports.accountingTaxRateResultDataFromJSON = accountingTaxRateResultDataFromJSON;
exports.accountingTaxRateResultToJSON = accountingTaxRateResultToJSON;
exports.accountingTaxRateResultFromJSON = accountingTaxRateResultFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const rawresponse_js_1 = require("./rawresponse.js");
var AccountingTaxRateResult2;
(function (AccountingTaxRateResult2) {
    AccountingTaxRateResult2["True"] = "true";
    AccountingTaxRateResult2["False"] = "false";
})(AccountingTaxRateResult2 || (exports.AccountingTaxRateResult2 = AccountingTaxRateResult2 = {}));
/** @internal */
exports.AccountingTaxRateResult2$inboundSchema = z.nativeEnum(AccountingTaxRateResult2);
/** @internal */
exports.AccountingTaxRateResult2$outboundSchema = exports.AccountingTaxRateResult2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AccountingTaxRateResult2$;
(function (AccountingTaxRateResult2$) {
    /** @deprecated use `AccountingTaxRateResult2$inboundSchema` instead. */
    AccountingTaxRateResult2$.inboundSchema = exports.AccountingTaxRateResult2$inboundSchema;
    /** @deprecated use `AccountingTaxRateResult2$outboundSchema` instead. */
    AccountingTaxRateResult2$.outboundSchema = exports.AccountingTaxRateResult2$outboundSchema;
})(AccountingTaxRateResult2$ || (exports.AccountingTaxRateResult2$ = AccountingTaxRateResult2$ = {}));
/** @internal */
exports.AccountingTaxRateResultActive$inboundSchema = z.union([z.boolean(), exports.AccountingTaxRateResult2$inboundSchema]);
/** @internal */
exports.AccountingTaxRateResultActive$outboundSchema = z.union([z.boolean(), exports.AccountingTaxRateResult2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AccountingTaxRateResultActive$;
(function (AccountingTaxRateResultActive$) {
    /** @deprecated use `AccountingTaxRateResultActive$inboundSchema` instead. */
    AccountingTaxRateResultActive$.inboundSchema = exports.AccountingTaxRateResultActive$inboundSchema;
    /** @deprecated use `AccountingTaxRateResultActive$outboundSchema` instead. */
    AccountingTaxRateResultActive$.outboundSchema = exports.AccountingTaxRateResultActive$outboundSchema;
})(AccountingTaxRateResultActive$ || (exports.AccountingTaxRateResultActive$ = AccountingTaxRateResultActive$ = {}));
function accountingTaxRateResultActiveToJSON(accountingTaxRateResultActive) {
    return JSON.stringify(exports.AccountingTaxRateResultActive$outboundSchema.parse(accountingTaxRateResultActive));
}
function accountingTaxRateResultActiveFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingTaxRateResultActive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingTaxRateResultActive' from JSON`);
}
/** @internal */
exports.AccountingTaxRateResultData$inboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.AccountingTaxRateResult2$inboundSchema])).optional(),
    code: z.nullable(z.string()).optional(),
    company_id: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    percentage: z.nullable(z.number()).optional(),
    remote_id: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "company_id": "companyId",
        "remote_id": "remoteId",
    });
});
/** @internal */
exports.AccountingTaxRateResultData$outboundSchema = z.object({
    active: z.nullable(z.union([z.boolean(), exports.AccountingTaxRateResult2$outboundSchema])).optional(),
    code: z.nullable(z.string()).optional(),
    companyId: z.nullable(z.string()).optional(),
    id: z.nullable(z.string()).optional(),
    name: z.nullable(z.string()).optional(),
    percentage: z.nullable(z.number()).optional(),
    remoteId: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        companyId: "company_id",
        remoteId: "remote_id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AccountingTaxRateResultData$;
(function (AccountingTaxRateResultData$) {
    /** @deprecated use `AccountingTaxRateResultData$inboundSchema` instead. */
    AccountingTaxRateResultData$.inboundSchema = exports.AccountingTaxRateResultData$inboundSchema;
    /** @deprecated use `AccountingTaxRateResultData$outboundSchema` instead. */
    AccountingTaxRateResultData$.outboundSchema = exports.AccountingTaxRateResultData$outboundSchema;
})(AccountingTaxRateResultData$ || (exports.AccountingTaxRateResultData$ = AccountingTaxRateResultData$ = {}));
function accountingTaxRateResultDataToJSON(accountingTaxRateResultData) {
    return JSON.stringify(exports.AccountingTaxRateResultData$outboundSchema.parse(accountingTaxRateResultData));
}
function accountingTaxRateResultDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingTaxRateResultData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingTaxRateResultData' from JSON`);
}
/** @internal */
exports.AccountingTaxRateResult$inboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.AccountingTaxRateResultData$inboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$inboundSchema)).optional(),
});
/** @internal */
exports.AccountingTaxRateResult$outboundSchema = z.object({
    data: z.nullable(z.lazy(() => exports.AccountingTaxRateResultData$outboundSchema))
        .optional(),
    raw: z.nullable(z.array(rawresponse_js_1.RawResponse$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AccountingTaxRateResult$;
(function (AccountingTaxRateResult$) {
    /** @deprecated use `AccountingTaxRateResult$inboundSchema` instead. */
    AccountingTaxRateResult$.inboundSchema = exports.AccountingTaxRateResult$inboundSchema;
    /** @deprecated use `AccountingTaxRateResult$outboundSchema` instead. */
    AccountingTaxRateResult$.outboundSchema = exports.AccountingTaxRateResult$outboundSchema;
})(AccountingTaxRateResult$ || (exports.AccountingTaxRateResult$ = AccountingTaxRateResult$ = {}));
function accountingTaxRateResultToJSON(accountingTaxRateResult) {
    return JSON.stringify(exports.AccountingTaxRateResult$outboundSchema.parse(accountingTaxRateResult));
}
function accountingTaxRateResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountingTaxRateResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingTaxRateResult' from JSON`);
}
//# sourceMappingURL=accountingtaxrateresult.js.map