/* * 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 PutApiV1ConfigDownloadclientIdRequest = { id: string; downloadClientConfigResource?: | models.DownloadClientConfigResource | undefined; }; /** @internal */ export const PutApiV1ConfigDownloadclientIdRequest$inboundSchema: z.ZodType< PutApiV1ConfigDownloadclientIdRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), DownloadClientConfigResource: models .DownloadClientConfigResource$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "DownloadClientConfigResource": "downloadClientConfigResource", }); }); /** @internal */ export type PutApiV1ConfigDownloadclientIdRequest$Outbound = { id: string; DownloadClientConfigResource?: | models.DownloadClientConfigResource$Outbound | undefined; }; /** @internal */ export const PutApiV1ConfigDownloadclientIdRequest$outboundSchema: z.ZodType< PutApiV1ConfigDownloadclientIdRequest$Outbound, z.ZodTypeDef, PutApiV1ConfigDownloadclientIdRequest > = z.object({ id: z.string(), downloadClientConfigResource: models .DownloadClientConfigResource$outboundSchema.optional(), }).transform((v) => { return remap$(v, { downloadClientConfigResource: "DownloadClientConfigResource", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PutApiV1ConfigDownloadclientIdRequest$ { /** @deprecated use `PutApiV1ConfigDownloadclientIdRequest$inboundSchema` instead. */ export const inboundSchema = PutApiV1ConfigDownloadclientIdRequest$inboundSchema; /** @deprecated use `PutApiV1ConfigDownloadclientIdRequest$outboundSchema` instead. */ export const outboundSchema = PutApiV1ConfigDownloadclientIdRequest$outboundSchema; /** @deprecated use `PutApiV1ConfigDownloadclientIdRequest$Outbound` instead. */ export type Outbound = PutApiV1ConfigDownloadclientIdRequest$Outbound; } export function putApiV1ConfigDownloadclientIdRequestToJSON( putApiV1ConfigDownloadclientIdRequest: PutApiV1ConfigDownloadclientIdRequest, ): string { return JSON.stringify( PutApiV1ConfigDownloadclientIdRequest$outboundSchema.parse( putApiV1ConfigDownloadclientIdRequest, ), ); } export function putApiV1ConfigDownloadclientIdRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PutApiV1ConfigDownloadclientIdRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PutApiV1ConfigDownloadclientIdRequest' from JSON`, ); }