/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type DownloadClientConfigResource = { id?: number | undefined; }; /** @internal */ export const DownloadClientConfigResource$inboundSchema: z.ZodType< DownloadClientConfigResource, z.ZodTypeDef, unknown > = z.object({ id: z.number().int().optional(), }); /** @internal */ export type DownloadClientConfigResource$Outbound = { id?: number | undefined; }; /** @internal */ export const DownloadClientConfigResource$outboundSchema: z.ZodType< DownloadClientConfigResource$Outbound, z.ZodTypeDef, DownloadClientConfigResource > = z.object({ id: z.number().int().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DownloadClientConfigResource$ { /** @deprecated use `DownloadClientConfigResource$inboundSchema` instead. */ export const inboundSchema = DownloadClientConfigResource$inboundSchema; /** @deprecated use `DownloadClientConfigResource$outboundSchema` instead. */ export const outboundSchema = DownloadClientConfigResource$outboundSchema; /** @deprecated use `DownloadClientConfigResource$Outbound` instead. */ export type Outbound = DownloadClientConfigResource$Outbound; } export function downloadClientConfigResourceToJSON( downloadClientConfigResource: DownloadClientConfigResource, ): string { return JSON.stringify( DownloadClientConfigResource$outboundSchema.parse( downloadClientConfigResource, ), ); } export function downloadClientConfigResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DownloadClientConfigResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadClientConfigResource' from JSON`, ); }