/* * 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 PostApiV1DownloadclientRequest = { forceSave?: boolean | undefined; downloadClientResource?: models.DownloadClientResource | undefined; }; /** @internal */ export const PostApiV1DownloadclientRequest$inboundSchema: z.ZodType< PostApiV1DownloadclientRequest, z.ZodTypeDef, unknown > = z.object({ forceSave: z.boolean().default(false), DownloadClientResource: models.DownloadClientResource$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "DownloadClientResource": "downloadClientResource", }); }); /** @internal */ export type PostApiV1DownloadclientRequest$Outbound = { forceSave: boolean; DownloadClientResource?: models.DownloadClientResource$Outbound | undefined; }; /** @internal */ export const PostApiV1DownloadclientRequest$outboundSchema: z.ZodType< PostApiV1DownloadclientRequest$Outbound, z.ZodTypeDef, PostApiV1DownloadclientRequest > = z.object({ forceSave: z.boolean().default(false), 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 PostApiV1DownloadclientRequest$ { /** @deprecated use `PostApiV1DownloadclientRequest$inboundSchema` instead. */ export const inboundSchema = PostApiV1DownloadclientRequest$inboundSchema; /** @deprecated use `PostApiV1DownloadclientRequest$outboundSchema` instead. */ export const outboundSchema = PostApiV1DownloadclientRequest$outboundSchema; /** @deprecated use `PostApiV1DownloadclientRequest$Outbound` instead. */ export type Outbound = PostApiV1DownloadclientRequest$Outbound; } export function postApiV1DownloadclientRequestToJSON( postApiV1DownloadclientRequest: PostApiV1DownloadclientRequest, ): string { return JSON.stringify( PostApiV1DownloadclientRequest$outboundSchema.parse( postApiV1DownloadclientRequest, ), ); } export function postApiV1DownloadclientRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PostApiV1DownloadclientRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostApiV1DownloadclientRequest' from JSON`, ); }