"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.GetAllDemographicsResponse$ = exports.GetAllDemographicsResponse$outboundSchema = exports.GetAllDemographicsResponse$inboundSchema = exports.GetAllDemographicsResponseBody$ = exports.GetAllDemographicsResponseBody$outboundSchema = exports.GetAllDemographicsResponseBody$inboundSchema = exports.GetAllDemographicsRequest$ = exports.GetAllDemographicsRequest$outboundSchema = exports.GetAllDemographicsRequest$inboundSchema = exports.GetAllDemographicsOrderBy$ = exports.GetAllDemographicsOrderBy$outboundSchema = exports.GetAllDemographicsOrderBy$inboundSchema = exports.GetAllDemographicsOrderBy = void 0;
exports.getAllDemographicsRequestToJSON = getAllDemographicsRequestToJSON;
exports.getAllDemographicsRequestFromJSON = getAllDemographicsRequestFromJSON;
exports.getAllDemographicsResponseBodyToJSON = getAllDemographicsResponseBodyToJSON;
exports.getAllDemographicsResponseBodyFromJSON = getAllDemographicsResponseBodyFromJSON;
exports.getAllDemographicsResponseToJSON = getAllDemographicsResponseToJSON;
exports.getAllDemographicsResponseFromJSON = getAllDemographicsResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The order to sort the response by
 */
exports.GetAllDemographicsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetAllDemographicsOrderBy$inboundSchema = z.nativeEnum(exports.GetAllDemographicsOrderBy);
/** @internal */
exports.GetAllDemographicsOrderBy$outboundSchema = exports.GetAllDemographicsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllDemographicsOrderBy$;
(function (GetAllDemographicsOrderBy$) {
    /** @deprecated use `GetAllDemographicsOrderBy$inboundSchema` instead. */
    GetAllDemographicsOrderBy$.inboundSchema = exports.GetAllDemographicsOrderBy$inboundSchema;
    /** @deprecated use `GetAllDemographicsOrderBy$outboundSchema` instead. */
    GetAllDemographicsOrderBy$.outboundSchema = exports.GetAllDemographicsOrderBy$outboundSchema;
})(GetAllDemographicsOrderBy$ || (exports.GetAllDemographicsOrderBy$ = GetAllDemographicsOrderBy$ = {}));
/** @internal */
exports.GetAllDemographicsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllDemographicsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllDemographicsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllDemographicsOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllDemographicsRequest$;
(function (GetAllDemographicsRequest$) {
    /** @deprecated use `GetAllDemographicsRequest$inboundSchema` instead. */
    GetAllDemographicsRequest$.inboundSchema = exports.GetAllDemographicsRequest$inboundSchema;
    /** @deprecated use `GetAllDemographicsRequest$outboundSchema` instead. */
    GetAllDemographicsRequest$.outboundSchema = exports.GetAllDemographicsRequest$outboundSchema;
})(GetAllDemographicsRequest$ || (exports.GetAllDemographicsRequest$ = GetAllDemographicsRequest$ = {}));
function getAllDemographicsRequestToJSON(getAllDemographicsRequest) {
    return JSON.stringify(exports.GetAllDemographicsRequest$outboundSchema.parse(getAllDemographicsRequest));
}
function getAllDemographicsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllDemographicsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllDemographicsRequest' from JSON`);
}
/** @internal */
exports.GetAllDemographicsResponseBody$inboundSchema = z.object({
    demographics: z.array(components.Demographics$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllDemographicsResponseBody$outboundSchema = z.object({
    demographics: z.array(components.Demographics$outboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllDemographicsResponseBody$;
(function (GetAllDemographicsResponseBody$) {
    /** @deprecated use `GetAllDemographicsResponseBody$inboundSchema` instead. */
    GetAllDemographicsResponseBody$.inboundSchema = exports.GetAllDemographicsResponseBody$inboundSchema;
    /** @deprecated use `GetAllDemographicsResponseBody$outboundSchema` instead. */
    GetAllDemographicsResponseBody$.outboundSchema = exports.GetAllDemographicsResponseBody$outboundSchema;
})(GetAllDemographicsResponseBody$ || (exports.GetAllDemographicsResponseBody$ = GetAllDemographicsResponseBody$ = {}));
function getAllDemographicsResponseBodyToJSON(getAllDemographicsResponseBody) {
    return JSON.stringify(exports.GetAllDemographicsResponseBody$outboundSchema.parse(getAllDemographicsResponseBody));
}
function getAllDemographicsResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllDemographicsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllDemographicsResponseBody' from JSON`);
}
/** @internal */
exports.GetAllDemographicsResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllDemographicsResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllDemographicsResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllDemographicsResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllDemographicsResponse$;
(function (GetAllDemographicsResponse$) {
    /** @deprecated use `GetAllDemographicsResponse$inboundSchema` instead. */
    GetAllDemographicsResponse$.inboundSchema = exports.GetAllDemographicsResponse$inboundSchema;
    /** @deprecated use `GetAllDemographicsResponse$outboundSchema` instead. */
    GetAllDemographicsResponse$.outboundSchema = exports.GetAllDemographicsResponse$outboundSchema;
})(GetAllDemographicsResponse$ || (exports.GetAllDemographicsResponse$ = GetAllDemographicsResponse$ = {}));
function getAllDemographicsResponseToJSON(getAllDemographicsResponse) {
    return JSON.stringify(exports.GetAllDemographicsResponse$outboundSchema.parse(getAllDemographicsResponse));
}
function getAllDemographicsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllDemographicsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllDemographicsResponse' from JSON`);
}
//# sourceMappingURL=getalldemographics.js.map