/* * 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 GetIdDownloadRequest = { id: number; link?: string | undefined; file?: string | undefined; }; /** @internal */ export const GetIdDownloadRequest$inboundSchema: z.ZodType< GetIdDownloadRequest, z.ZodTypeDef, unknown > = z.object({ id: z.number().int(), link: z.string().optional(), file: z.string().optional(), }); /** @internal */ export type GetIdDownloadRequest$Outbound = { id: number; link?: string | undefined; file?: string | undefined; }; /** @internal */ export const GetIdDownloadRequest$outboundSchema: z.ZodType< GetIdDownloadRequest$Outbound, z.ZodTypeDef, GetIdDownloadRequest > = z.object({ id: z.number().int(), link: z.string().optional(), file: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetIdDownloadRequest$ { /** @deprecated use `GetIdDownloadRequest$inboundSchema` instead. */ export const inboundSchema = GetIdDownloadRequest$inboundSchema; /** @deprecated use `GetIdDownloadRequest$outboundSchema` instead. */ export const outboundSchema = GetIdDownloadRequest$outboundSchema; /** @deprecated use `GetIdDownloadRequest$Outbound` instead. */ export type Outbound = GetIdDownloadRequest$Outbound; } export function getIdDownloadRequestToJSON( getIdDownloadRequest: GetIdDownloadRequest, ): string { return JSON.stringify( GetIdDownloadRequest$outboundSchema.parse(getIdDownloadRequest), ); } export function getIdDownloadRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetIdDownloadRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetIdDownloadRequest' from JSON`, ); }