/* * 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 AppProfileResource = { id?: number | undefined; name?: string | null | undefined; enableRss?: boolean | undefined; enableAutomaticSearch?: boolean | undefined; enableInteractiveSearch?: boolean | undefined; minimumSeeders?: number | undefined; }; /** @internal */ export const AppProfileResource$inboundSchema: z.ZodType< AppProfileResource, z.ZodTypeDef, unknown > = z.object({ id: z.number().int().optional(), name: z.nullable(z.string()).optional(), enableRss: z.boolean().optional(), enableAutomaticSearch: z.boolean().optional(), enableInteractiveSearch: z.boolean().optional(), minimumSeeders: z.number().int().optional(), }); /** @internal */ export type AppProfileResource$Outbound = { id?: number | undefined; name?: string | null | undefined; enableRss?: boolean | undefined; enableAutomaticSearch?: boolean | undefined; enableInteractiveSearch?: boolean | undefined; minimumSeeders?: number | undefined; }; /** @internal */ export const AppProfileResource$outboundSchema: z.ZodType< AppProfileResource$Outbound, z.ZodTypeDef, AppProfileResource > = z.object({ id: z.number().int().optional(), name: z.nullable(z.string()).optional(), enableRss: z.boolean().optional(), enableAutomaticSearch: z.boolean().optional(), enableInteractiveSearch: z.boolean().optional(), minimumSeeders: 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 AppProfileResource$ { /** @deprecated use `AppProfileResource$inboundSchema` instead. */ export const inboundSchema = AppProfileResource$inboundSchema; /** @deprecated use `AppProfileResource$outboundSchema` instead. */ export const outboundSchema = AppProfileResource$outboundSchema; /** @deprecated use `AppProfileResource$Outbound` instead. */ export type Outbound = AppProfileResource$Outbound; } export function appProfileResourceToJSON( appProfileResource: AppProfileResource, ): string { return JSON.stringify( AppProfileResource$outboundSchema.parse(appProfileResource), ); } export function appProfileResourceFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AppProfileResource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AppProfileResource' from JSON`, ); }