/* * 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 GetApiV1IndexerIdDownloadRequest = { id: number; link?: string | undefined; file?: string | undefined; }; /** @internal */ export const GetApiV1IndexerIdDownloadRequest$inboundSchema: z.ZodType< GetApiV1IndexerIdDownloadRequest, z.ZodTypeDef, unknown > = z.object({ id: z.number().int(), link: z.string().optional(), file: z.string().optional(), }); /** @internal */ export type GetApiV1IndexerIdDownloadRequest$Outbound = { id: number; link?: string | undefined; file?: string | undefined; }; /** @internal */ export const GetApiV1IndexerIdDownloadRequest$outboundSchema: z.ZodType< GetApiV1IndexerIdDownloadRequest$Outbound, z.ZodTypeDef, GetApiV1IndexerIdDownloadRequest > = 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 GetApiV1IndexerIdDownloadRequest$ { /** @deprecated use `GetApiV1IndexerIdDownloadRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV1IndexerIdDownloadRequest$inboundSchema; /** @deprecated use `GetApiV1IndexerIdDownloadRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV1IndexerIdDownloadRequest$outboundSchema; /** @deprecated use `GetApiV1IndexerIdDownloadRequest$Outbound` instead. */ export type Outbound = GetApiV1IndexerIdDownloadRequest$Outbound; } export function getApiV1IndexerIdDownloadRequestToJSON( getApiV1IndexerIdDownloadRequest: GetApiV1IndexerIdDownloadRequest, ): string { return JSON.stringify( GetApiV1IndexerIdDownloadRequest$outboundSchema.parse( getApiV1IndexerIdDownloadRequest, ), ); } export function getApiV1IndexerIdDownloadRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV1IndexerIdDownloadRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV1IndexerIdDownloadRequest' from JSON`, ); }