/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
export const DemographicsStatus = {
    Active: "active",
    Tobedeleted: "tobedeleted",
};
export const Sex = {
    Male: "male",
    Female: "female",
    Other: "other",
    Unspecified: "unspecified",
};
/** @internal */
export const DemographicsStatus$inboundSchema = z.nativeEnum(DemographicsStatus);
/** @internal */
export const DemographicsStatus$outboundSchema = DemographicsStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DemographicsStatus$;
(function (DemographicsStatus$) {
    /** @deprecated use `DemographicsStatus$inboundSchema` instead. */
    DemographicsStatus$.inboundSchema = DemographicsStatus$inboundSchema;
    /** @deprecated use `DemographicsStatus$outboundSchema` instead. */
    DemographicsStatus$.outboundSchema = DemographicsStatus$outboundSchema;
})(DemographicsStatus$ || (DemographicsStatus$ = {}));
/** @internal */
export const Sex$inboundSchema = z.nativeEnum(Sex);
/** @internal */
export const Sex$outboundSchema = Sex$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Sex$;
(function (Sex$) {
    /** @deprecated use `Sex$inboundSchema` instead. */
    Sex$.inboundSchema = Sex$inboundSchema;
    /** @deprecated use `Sex$outboundSchema` instead. */
    Sex$.outboundSchema = Sex$outboundSchema;
})(Sex$ || (Sex$ = {}));
/** @internal */
export const Demographics$inboundSchema = z.object({
    sourcedId: z.string(),
    status: DemographicsStatus$inboundSchema,
    dateLastModified: z.string().datetime({ offset: true }).transform(v => new Date(v)).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    birthDate: z.nullable(z.string()),
    sex: z.nullable(Sex$inboundSchema),
    americanIndianOrAlaskaNative: z.nullable(z.string()),
    asian: z.nullable(z.string()),
    blackOrAfricanAmerican: z.nullable(z.string()),
    nativeHawaiianOrOtherPacificIslander: z.nullable(z.string()),
    white: z.nullable(z.string()),
    demographicRaceTwoOrMoreRaces: z.nullable(z.string()),
    hispanicOrLatinoEthnicity: z.nullable(z.string()),
    countryOfBirthCode: z.nullable(z.string()),
    stateOfBirthAbbreviation: z.nullable(z.string()),
    cityOfBirth: z.nullable(z.string()),
    publicSchoolResidenceStatus: z.nullable(z.string()),
});
/** @internal */
export const Demographics$outboundSchema = z.object({
    sourcedId: z.string(),
    status: DemographicsStatus$outboundSchema,
    dateLastModified: z.date().transform(v => v.toISOString()).optional(),
    metadata: z.nullable(z.record(z.any())).optional(),
    birthDate: z.nullable(z.string()),
    sex: z.nullable(Sex$outboundSchema),
    americanIndianOrAlaskaNative: z.nullable(z.string()),
    asian: z.nullable(z.string()),
    blackOrAfricanAmerican: z.nullable(z.string()),
    nativeHawaiianOrOtherPacificIslander: z.nullable(z.string()),
    white: z.nullable(z.string()),
    demographicRaceTwoOrMoreRaces: z.nullable(z.string()),
    hispanicOrLatinoEthnicity: z.nullable(z.string()),
    countryOfBirthCode: z.nullable(z.string()),
    stateOfBirthAbbreviation: z.nullable(z.string()),
    cityOfBirth: z.nullable(z.string()),
    publicSchoolResidenceStatus: z.nullable(z.string()),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Demographics$;
(function (Demographics$) {
    /** @deprecated use `Demographics$inboundSchema` instead. */
    Demographics$.inboundSchema = Demographics$inboundSchema;
    /** @deprecated use `Demographics$outboundSchema` instead. */
    Demographics$.outboundSchema = Demographics$outboundSchema;
})(Demographics$ || (Demographics$ = {}));
export function demographicsToJSON(demographics) {
    return JSON.stringify(Demographics$outboundSchema.parse(demographics));
}
export function demographicsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Demographics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Demographics' from JSON`);
}
//# sourceMappingURL=demographics.js.map