"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.ticketingListCollectionsResponseFromJSON = exports.ticketingListCollectionsResponseToJSON = exports.TicketingListCollectionsResponse$ = exports.TicketingListCollectionsResponse$outboundSchema = exports.TicketingListCollectionsResponse$inboundSchema = exports.ticketingListCollectionsRequestFromJSON = exports.ticketingListCollectionsRequestToJSON = exports.TicketingListCollectionsRequest$ = exports.TicketingListCollectionsRequest$outboundSchema = exports.TicketingListCollectionsRequest$inboundSchema = exports.ticketingListCollectionsQueryParamFilterFromJSON = exports.ticketingListCollectionsQueryParamFilterToJSON = exports.TicketingListCollectionsQueryParamFilter$ = exports.TicketingListCollectionsQueryParamFilter$outboundSchema = exports.TicketingListCollectionsQueryParamFilter$inboundSchema = exports.TicketingListCollectionsQueryParamType$ = exports.TicketingListCollectionsQueryParamType$outboundSchema = exports.TicketingListCollectionsQueryParamType$inboundSchema = exports.TicketingListCollectionsQueryParamType = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const shared = __importStar(require("../shared/index.js"));
/**
 * Filter collections by type
 */
var TicketingListCollectionsQueryParamType;
(function (TicketingListCollectionsQueryParamType) {
    TicketingListCollectionsQueryParamType["Project"] = "project";
    TicketingListCollectionsQueryParamType["Component"] = "component";
})(TicketingListCollectionsQueryParamType || (exports.TicketingListCollectionsQueryParamType = TicketingListCollectionsQueryParamType = {}));
/** @internal */
exports.TicketingListCollectionsQueryParamType$inboundSchema = z.nativeEnum(TicketingListCollectionsQueryParamType);
/** @internal */
exports.TicketingListCollectionsQueryParamType$outboundSchema = exports.TicketingListCollectionsQueryParamType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingListCollectionsQueryParamType$;
(function (TicketingListCollectionsQueryParamType$) {
    /** @deprecated use `TicketingListCollectionsQueryParamType$inboundSchema` instead. */
    TicketingListCollectionsQueryParamType$.inboundSchema = exports.TicketingListCollectionsQueryParamType$inboundSchema;
    /** @deprecated use `TicketingListCollectionsQueryParamType$outboundSchema` instead. */
    TicketingListCollectionsQueryParamType$.outboundSchema = exports.TicketingListCollectionsQueryParamType$outboundSchema;
})(TicketingListCollectionsQueryParamType$ || (exports.TicketingListCollectionsQueryParamType$ = TicketingListCollectionsQueryParamType$ = {}));
/** @internal */
exports.TicketingListCollectionsQueryParamFilter$inboundSchema = z.object({
    type: z.nullable(exports.TicketingListCollectionsQueryParamType$inboundSchema)
        .optional(),
    updated_after: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "updated_after": "updatedAfter",
    });
});
/** @internal */
exports.TicketingListCollectionsQueryParamFilter$outboundSchema = z.object({
    type: z.nullable(exports.TicketingListCollectionsQueryParamType$outboundSchema)
        .optional(),
    updatedAfter: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        updatedAfter: "updated_after",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingListCollectionsQueryParamFilter$;
(function (TicketingListCollectionsQueryParamFilter$) {
    /** @deprecated use `TicketingListCollectionsQueryParamFilter$inboundSchema` instead. */
    TicketingListCollectionsQueryParamFilter$.inboundSchema = exports.TicketingListCollectionsQueryParamFilter$inboundSchema;
    /** @deprecated use `TicketingListCollectionsQueryParamFilter$outboundSchema` instead. */
    TicketingListCollectionsQueryParamFilter$.outboundSchema = exports.TicketingListCollectionsQueryParamFilter$outboundSchema;
})(TicketingListCollectionsQueryParamFilter$ || (exports.TicketingListCollectionsQueryParamFilter$ = TicketingListCollectionsQueryParamFilter$ = {}));
function ticketingListCollectionsQueryParamFilterToJSON(ticketingListCollectionsQueryParamFilter) {
    return JSON.stringify(exports.TicketingListCollectionsQueryParamFilter$outboundSchema.parse(ticketingListCollectionsQueryParamFilter));
}
exports.ticketingListCollectionsQueryParamFilterToJSON = ticketingListCollectionsQueryParamFilterToJSON;
function ticketingListCollectionsQueryParamFilterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingListCollectionsQueryParamFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingListCollectionsQueryParamFilter' from JSON`);
}
exports.ticketingListCollectionsQueryParamFilterFromJSON = ticketingListCollectionsQueryParamFilterFromJSON;
/** @internal */
exports.TicketingListCollectionsRequest$inboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.TicketingListCollectionsQueryParamFilter$inboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    page_size: z.nullable(z.string()).optional(),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean()).optional(),
    updated_after: z.nullable(z.string()).optional(),
    "x-account-id": z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "page_size": "pageSize",
        "updated_after": "updatedAfter",
        "x-account-id": "xAccountId",
    });
});
/** @internal */
exports.TicketingListCollectionsRequest$outboundSchema = z.object({
    fields: z.nullable(z.string()).optional(),
    filter: z.nullable(z.lazy(() => exports.TicketingListCollectionsQueryParamFilter$outboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    page: z.nullable(z.string()).optional(),
    pageSize: z.nullable(z.string()).optional(),
    proxy: z.nullable(z.record(z.any())).optional(),
    raw: z.nullable(z.boolean()).optional(),
    updatedAfter: z.nullable(z.string()).optional(),
    xAccountId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        pageSize: "page_size",
        updatedAfter: "updated_after",
        xAccountId: "x-account-id",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingListCollectionsRequest$;
(function (TicketingListCollectionsRequest$) {
    /** @deprecated use `TicketingListCollectionsRequest$inboundSchema` instead. */
    TicketingListCollectionsRequest$.inboundSchema = exports.TicketingListCollectionsRequest$inboundSchema;
    /** @deprecated use `TicketingListCollectionsRequest$outboundSchema` instead. */
    TicketingListCollectionsRequest$.outboundSchema = exports.TicketingListCollectionsRequest$outboundSchema;
})(TicketingListCollectionsRequest$ || (exports.TicketingListCollectionsRequest$ = TicketingListCollectionsRequest$ = {}));
function ticketingListCollectionsRequestToJSON(ticketingListCollectionsRequest) {
    return JSON.stringify(exports.TicketingListCollectionsRequest$outboundSchema.parse(ticketingListCollectionsRequest));
}
exports.ticketingListCollectionsRequestToJSON = ticketingListCollectionsRequestToJSON;
function ticketingListCollectionsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingListCollectionsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingListCollectionsRequest' from JSON`);
}
exports.ticketingListCollectionsRequestFromJSON = ticketingListCollectionsRequestFromJSON;
/** @internal */
exports.TicketingListCollectionsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
    TicketingCollectionsPaginated: shared
        .TicketingCollectionsPaginated$inboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
        "TicketingCollectionsPaginated": "ticketingCollectionsPaginated",
    });
});
/** @internal */
exports.TicketingListCollectionsResponse$outboundSchema = z.object({
    contentType: z.string(),
    headers: z.record(z.array(z.string())),
    statusCode: z.number().int(),
    rawResponse: z.instanceof(Response).transform(() => {
        throw new Error("Response cannot be serialized");
    }),
    ticketingCollectionsPaginated: shared
        .TicketingCollectionsPaginated$outboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        contentType: "ContentType",
        headers: "Headers",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
        ticketingCollectionsPaginated: "TicketingCollectionsPaginated",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var TicketingListCollectionsResponse$;
(function (TicketingListCollectionsResponse$) {
    /** @deprecated use `TicketingListCollectionsResponse$inboundSchema` instead. */
    TicketingListCollectionsResponse$.inboundSchema = exports.TicketingListCollectionsResponse$inboundSchema;
    /** @deprecated use `TicketingListCollectionsResponse$outboundSchema` instead. */
    TicketingListCollectionsResponse$.outboundSchema = exports.TicketingListCollectionsResponse$outboundSchema;
})(TicketingListCollectionsResponse$ || (exports.TicketingListCollectionsResponse$ = TicketingListCollectionsResponse$ = {}));
function ticketingListCollectionsResponseToJSON(ticketingListCollectionsResponse) {
    return JSON.stringify(exports.TicketingListCollectionsResponse$outboundSchema.parse(ticketingListCollectionsResponse));
}
exports.ticketingListCollectionsResponseToJSON = ticketingListCollectionsResponseToJSON;
function ticketingListCollectionsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TicketingListCollectionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TicketingListCollectionsResponse' from JSON`);
}
exports.ticketingListCollectionsResponseFromJSON = ticketingListCollectionsResponseFromJSON;
//# sourceMappingURL=ticketinglistcollections.js.map