/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Auth, Auth$inboundSchema } from "./auth.js"; import { Members, Members$inboundSchema } from "./members.js"; export type EtcdV3 = { auth?: Auth | undefined; members?: Array | null | undefined; totalKeys?: number | undefined; }; /** @internal */ export const EtcdV3$inboundSchema: z.ZodType = z .object({ auth: Auth$inboundSchema.optional(), members: z.nullable(z.array(Members$inboundSchema)).optional(), total_keys: z.number().int().optional(), }).transform((v) => { return remap$(v, { "total_keys": "totalKeys", }); }); export function etcdV3FromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EtcdV3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EtcdV3' from JSON`, ); }