/* * 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 { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; export type PutApiV1DownloadclientIdRequest = { forceSave?: boolean | undefined; id: string; downloadClientResource?: models.DownloadClientResource | undefined; }; /** @internal */ export const PutApiV1DownloadclientIdRequest$inboundSchema: z.ZodType< PutApiV1DownloadclientIdRequest, z.ZodTypeDef, unknown > = z.object({ forceSave: z.boolean().default(false), id: z.string(), DownloadClientResource: models.DownloadClientResource$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "DownloadClientResource": "downloadClientResource", }); }); /** @internal */ export type PutApiV1DownloadclientIdRequest$Outbound = { forceSave: boolean; id: string; DownloadClientResource?: models.DownloadClientResource$Outbound | undefined; }; /** @internal */ export const PutApiV1DownloadclientIdRequest$outboundSchema: z.ZodType< PutApiV1DownloadclientIdRequest$Outbound, z.ZodTypeDef, PutApiV1DownloadclientIdRequest > = z.object({ forceSave: z.boolean().default(false), id: z.string(), downloadClientResource: models.DownloadClientResource$outboundSchema .optional(), }).transform((v) => { return remap$(v, { downloadClientResource: "DownloadClientResource", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PutApiV1DownloadclientIdRequest$ { /** @deprecated use `PutApiV1DownloadclientIdRequest$inboundSchema` instead. */ export const inboundSchema = PutApiV1DownloadclientIdRequest$inboundSchema; /** @deprecated use `PutApiV1DownloadclientIdRequest$outboundSchema` instead. */ export const outboundSchema = PutApiV1DownloadclientIdRequest$outboundSchema; /** @deprecated use `PutApiV1DownloadclientIdRequest$Outbound` instead. */ export type Outbound = PutApiV1DownloadclientIdRequest$Outbound; } export function putApiV1DownloadclientIdRequestToJSON( putApiV1DownloadclientIdRequest: PutApiV1DownloadclientIdRequest, ): string { return JSON.stringify( PutApiV1DownloadclientIdRequest$outboundSchema.parse( putApiV1DownloadclientIdRequest, ), ); } export function putApiV1DownloadclientIdRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PutApiV1DownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutApiV1DownloadclientIdRequest' from JSON`, ); }