"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.CreateLineItemResponse$ = exports.CreateLineItemResponse$outboundSchema = exports.CreateLineItemResponse$inboundSchema = exports.CreateLineItemSourcedIdPairs$ = exports.CreateLineItemSourcedIdPairs$outboundSchema = exports.CreateLineItemSourcedIdPairs$inboundSchema = exports.CreateLineItemRequest$ = exports.CreateLineItemRequest$outboundSchema = exports.CreateLineItemRequest$inboundSchema = void 0;
exports.createLineItemRequestToJSON = createLineItemRequestToJSON;
exports.createLineItemRequestFromJSON = createLineItemRequestFromJSON;
exports.createLineItemSourcedIdPairsToJSON = createLineItemSourcedIdPairsToJSON;
exports.createLineItemSourcedIdPairsFromJSON = createLineItemSourcedIdPairsFromJSON;
exports.createLineItemResponseToJSON = createLineItemResponseToJSON;
exports.createLineItemResponseFromJSON = createLineItemResponseFromJSON;
const z = __importStar(require("zod"));
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/** @internal */
exports.CreateLineItemRequest$inboundSchema = z.object({
    lineItem: components.LineItem$inboundSchema,
});
/** @internal */
exports.CreateLineItemRequest$outboundSchema = z.object({
    lineItem: components.LineItem$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateLineItemRequest$;
(function (CreateLineItemRequest$) {
    /** @deprecated use `CreateLineItemRequest$inboundSchema` instead. */
    CreateLineItemRequest$.inboundSchema = exports.CreateLineItemRequest$inboundSchema;
    /** @deprecated use `CreateLineItemRequest$outboundSchema` instead. */
    CreateLineItemRequest$.outboundSchema = exports.CreateLineItemRequest$outboundSchema;
})(CreateLineItemRequest$ || (exports.CreateLineItemRequest$ = CreateLineItemRequest$ = {}));
function createLineItemRequestToJSON(createLineItemRequest) {
    return JSON.stringify(exports.CreateLineItemRequest$outboundSchema.parse(createLineItemRequest));
}
function createLineItemRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateLineItemRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateLineItemRequest' from JSON`);
}
/** @internal */
exports.CreateLineItemSourcedIdPairs$inboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/** @internal */
exports.CreateLineItemSourcedIdPairs$outboundSchema = z.object({
    suppliedSourcedId: z.string(),
    allocatedSourcedId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateLineItemSourcedIdPairs$;
(function (CreateLineItemSourcedIdPairs$) {
    /** @deprecated use `CreateLineItemSourcedIdPairs$inboundSchema` instead. */
    CreateLineItemSourcedIdPairs$.inboundSchema = exports.CreateLineItemSourcedIdPairs$inboundSchema;
    /** @deprecated use `CreateLineItemSourcedIdPairs$outboundSchema` instead. */
    CreateLineItemSourcedIdPairs$.outboundSchema = exports.CreateLineItemSourcedIdPairs$outboundSchema;
})(CreateLineItemSourcedIdPairs$ || (exports.CreateLineItemSourcedIdPairs$ = CreateLineItemSourcedIdPairs$ = {}));
function createLineItemSourcedIdPairsToJSON(createLineItemSourcedIdPairs) {
    return JSON.stringify(exports.CreateLineItemSourcedIdPairs$outboundSchema.parse(createLineItemSourcedIdPairs));
}
function createLineItemSourcedIdPairsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateLineItemSourcedIdPairs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateLineItemSourcedIdPairs' from JSON`);
}
/** @internal */
exports.CreateLineItemResponse$inboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateLineItemSourcedIdPairs$inboundSchema),
});
/** @internal */
exports.CreateLineItemResponse$outboundSchema = z.object({
    sourcedIdPairs: z.lazy(() => exports.CreateLineItemSourcedIdPairs$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreateLineItemResponse$;
(function (CreateLineItemResponse$) {
    /** @deprecated use `CreateLineItemResponse$inboundSchema` instead. */
    CreateLineItemResponse$.inboundSchema = exports.CreateLineItemResponse$inboundSchema;
    /** @deprecated use `CreateLineItemResponse$outboundSchema` instead. */
    CreateLineItemResponse$.outboundSchema = exports.CreateLineItemResponse$outboundSchema;
})(CreateLineItemResponse$ || (exports.CreateLineItemResponse$ = CreateLineItemResponse$ = {}));
function createLineItemResponseToJSON(createLineItemResponse) {
    return JSON.stringify(exports.CreateLineItemResponse$outboundSchema.parse(createLineItemResponse));
}
function createLineItemResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateLineItemResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateLineItemResponse' from JSON`);
}
//# sourceMappingURL=createlineitem.js.map