/* * 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 { ApplyTags, ApplyTags$inboundSchema, ApplyTags$outboundSchema, } from "./applytags.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type DownloadClientBulkResource = { ids?: Array | null | undefined; tags?: Array | null | undefined; applyTags?: ApplyTags | undefined; enable?: boolean | null | undefined; priority?: number | null | undefined; }; /** @internal */ export const DownloadClientBulkResource$inboundSchema: z.ZodType< DownloadClientBulkResource, z.ZodTypeDef, unknown > = z.object({ ids: z.nullable(z.array(z.number().int())).optional(), tags: z.nullable(z.array(z.number().int())).optional(), applyTags: ApplyTags$inboundSchema.optional(), enable: z.nullable(z.boolean()).optional(), priority: z.nullable(z.number().int()).optional(), }); /** @internal */ export type DownloadClientBulkResource$Outbound = { ids?: Array | null | undefined; tags?: Array | null | undefined; applyTags?: string | undefined; enable?: boolean | null | undefined; priority?: number | null | undefined; }; /** @internal */ export const DownloadClientBulkResource$outboundSchema: z.ZodType< DownloadClientBulkResource$Outbound, z.ZodTypeDef, DownloadClientBulkResource > = z.object({ ids: z.nullable(z.array(z.number().int())).optional(), tags: z.nullable(z.array(z.number().int())).optional(), applyTags: ApplyTags$outboundSchema.optional(), enable: z.nullable(z.boolean()).optional(), priority: z.nullable(z.number().int()).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DownloadClientBulkResource$ { /** @deprecated use `DownloadClientBulkResource$inboundSchema` instead. */ export const inboundSchema = DownloadClientBulkResource$inboundSchema; /** @deprecated use `DownloadClientBulkResource$outboundSchema` instead. */ export const outboundSchema = DownloadClientBulkResource$outboundSchema; /** @deprecated use `DownloadClientBulkResource$Outbound` instead. */ export type Outbound = DownloadClientBulkResource$Outbound; } export function downloadClientBulkResourceToJSON( downloadClientBulkResource: DownloadClientBulkResource, ): string { return JSON.stringify( DownloadClientBulkResource$outboundSchema.parse(downloadClientBulkResource), ); } export function downloadClientBulkResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DownloadClientBulkResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DownloadClientBulkResource' from JSON`, ); }