/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { TenantBillingDetails, TenantBillingDetails$inboundSchema, } from "./tenant-billing-details.js"; export type TenantResponse = { billingDetails?: TenantBillingDetails | undefined; createdAt?: Date | undefined; id?: string | undefined; metadata?: { [k: string]: string } | undefined; name?: string | undefined; status?: string | undefined; updatedAt?: Date | undefined; }; /** @internal */ export const TenantResponse$inboundSchema: z.ZodMiniType< TenantResponse, unknown > = z.pipe( z.object({ billing_details: types.optional(TenantBillingDetails$inboundSchema), created_at: types.optional(types.date()), id: types.optional(types.string()), metadata: types.optional(z.record(z.string(), types.string())), name: types.optional(types.string()), status: types.optional(types.string()), updated_at: types.optional(types.date()), }), z.transform((v) => { return remap$(v, { "billing_details": "billingDetails", "created_at": "createdAt", "updated_at": "updatedAt", }); }), ); export function tenantResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TenantResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TenantResponse' from JSON`, ); }