/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as components from "../components/index.js";
/**
 * The order to sort the response by
 */
export const GetAllDemographicsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllDemographicsOrderBy$inboundSchema = z.nativeEnum(GetAllDemographicsOrderBy);
/** @internal */
export const GetAllDemographicsOrderBy$outboundSchema = GetAllDemographicsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllDemographicsOrderBy$;
(function (GetAllDemographicsOrderBy$) {
    /** @deprecated use `GetAllDemographicsOrderBy$inboundSchema` instead. */
    GetAllDemographicsOrderBy$.inboundSchema = GetAllDemographicsOrderBy$inboundSchema;
    /** @deprecated use `GetAllDemographicsOrderBy$outboundSchema` instead. */
    GetAllDemographicsOrderBy$.outboundSchema = GetAllDemographicsOrderBy$outboundSchema;
})(GetAllDemographicsOrderBy$ || (GetAllDemographicsOrderBy$ = {}));
/** @internal */
export const 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: GetAllDemographicsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const 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: 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.
 */
export var GetAllDemographicsRequest$;
(function (GetAllDemographicsRequest$) {
    /** @deprecated use `GetAllDemographicsRequest$inboundSchema` instead. */
    GetAllDemographicsRequest$.inboundSchema = GetAllDemographicsRequest$inboundSchema;
    /** @deprecated use `GetAllDemographicsRequest$outboundSchema` instead. */
    GetAllDemographicsRequest$.outboundSchema = GetAllDemographicsRequest$outboundSchema;
})(GetAllDemographicsRequest$ || (GetAllDemographicsRequest$ = {}));
export function getAllDemographicsRequestToJSON(getAllDemographicsRequest) {
    return JSON.stringify(GetAllDemographicsRequest$outboundSchema.parse(getAllDemographicsRequest));
}
export function getAllDemographicsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllDemographicsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllDemographicsRequest' from JSON`);
}
/** @internal */
export const 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 */
export const 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.
 */
export var GetAllDemographicsResponseBody$;
(function (GetAllDemographicsResponseBody$) {
    /** @deprecated use `GetAllDemographicsResponseBody$inboundSchema` instead. */
    GetAllDemographicsResponseBody$.inboundSchema = GetAllDemographicsResponseBody$inboundSchema;
    /** @deprecated use `GetAllDemographicsResponseBody$outboundSchema` instead. */
    GetAllDemographicsResponseBody$.outboundSchema = GetAllDemographicsResponseBody$outboundSchema;
})(GetAllDemographicsResponseBody$ || (GetAllDemographicsResponseBody$ = {}));
export function getAllDemographicsResponseBodyToJSON(getAllDemographicsResponseBody) {
    return JSON.stringify(GetAllDemographicsResponseBody$outboundSchema.parse(getAllDemographicsResponseBody));
}
export function getAllDemographicsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllDemographicsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllDemographicsResponseBody' from JSON`);
}
/** @internal */
export const GetAllDemographicsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllDemographicsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllDemographicsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllDemographicsResponseBody$outboundSchema),
}).transform((v) => {
    return 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.
 */
export var GetAllDemographicsResponse$;
(function (GetAllDemographicsResponse$) {
    /** @deprecated use `GetAllDemographicsResponse$inboundSchema` instead. */
    GetAllDemographicsResponse$.inboundSchema = GetAllDemographicsResponse$inboundSchema;
    /** @deprecated use `GetAllDemographicsResponse$outboundSchema` instead. */
    GetAllDemographicsResponse$.outboundSchema = GetAllDemographicsResponse$outboundSchema;
})(GetAllDemographicsResponse$ || (GetAllDemographicsResponse$ = {}));
export function getAllDemographicsResponseToJSON(getAllDemographicsResponse) {
    return JSON.stringify(GetAllDemographicsResponse$outboundSchema.parse(getAllDemographicsResponse));
}
export function getAllDemographicsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllDemographicsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllDemographicsResponse' from JSON`);
}
//# sourceMappingURL=getalldemographics.js.map