/* * 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 TagDetailsResource = { id?: number | undefined; label?: string | null | undefined; notificationIds?: Array | null | undefined; indexerIds?: Array | null | undefined; indexerProxyIds?: Array | null | undefined; applicationIds?: Array | null | undefined; }; /** @internal */ export const TagDetailsResource$inboundSchema: z.ZodType< TagDetailsResource, z.ZodTypeDef, unknown > = z.object({ id: z.number().int().optional(), label: z.nullable(z.string()).optional(), notificationIds: z.nullable(z.array(z.number().int())).optional(), indexerIds: z.nullable(z.array(z.number().int())).optional(), indexerProxyIds: z.nullable(z.array(z.number().int())).optional(), applicationIds: z.nullable(z.array(z.number().int())).optional(), }); /** @internal */ export type TagDetailsResource$Outbound = { id?: number | undefined; label?: string | null | undefined; notificationIds?: Array | null | undefined; indexerIds?: Array | null | undefined; indexerProxyIds?: Array | null | undefined; applicationIds?: Array | null | undefined; }; /** @internal */ export const TagDetailsResource$outboundSchema: z.ZodType< TagDetailsResource$Outbound, z.ZodTypeDef, TagDetailsResource > = z.object({ id: z.number().int().optional(), label: z.nullable(z.string()).optional(), notificationIds: z.nullable(z.array(z.number().int())).optional(), indexerIds: z.nullable(z.array(z.number().int())).optional(), indexerProxyIds: z.nullable(z.array(z.number().int())).optional(), applicationIds: z.nullable(z.array(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 TagDetailsResource$ { /** @deprecated use `TagDetailsResource$inboundSchema` instead. */ export const inboundSchema = TagDetailsResource$inboundSchema; /** @deprecated use `TagDetailsResource$outboundSchema` instead. */ export const outboundSchema = TagDetailsResource$outboundSchema; /** @deprecated use `TagDetailsResource$Outbound` instead. */ export type Outbound = TagDetailsResource$Outbound; } export function tagDetailsResourceToJSON( tagDetailsResource: TagDetailsResource, ): string { return JSON.stringify( TagDetailsResource$outboundSchema.parse(tagDetailsResource), ); } export function tagDetailsResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => TagDetailsResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TagDetailsResource' from JSON`, ); }