/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { RegistrySource, RegistrySource$inboundSchema, RegistrySource$outboundSchema, } from "./registrysource.js"; export type ActivateRegistryEntryRequest = { source: RegistrySource; modelId: string; }; /** @internal */ export const ActivateRegistryEntryRequest$inboundSchema: z.ZodType< ActivateRegistryEntryRequest, z.ZodTypeDef, unknown > = z.object({ source: RegistrySource$inboundSchema, model_id: z.string(), }).transform((v) => { return remap$(v, { "model_id": "modelId", }); }); /** @internal */ export type ActivateRegistryEntryRequest$Outbound = { source: string; model_id: string; }; /** @internal */ export const ActivateRegistryEntryRequest$outboundSchema: z.ZodType< ActivateRegistryEntryRequest$Outbound, z.ZodTypeDef, ActivateRegistryEntryRequest > = z.object({ source: RegistrySource$outboundSchema, modelId: z.string(), }).transform((v) => { return remap$(v, { modelId: "model_id", }); }); export function activateRegistryEntryRequestToJSON( activateRegistryEntryRequest: ActivateRegistryEntryRequest, ): string { return JSON.stringify( ActivateRegistryEntryRequest$outboundSchema.parse( activateRegistryEntryRequest, ), ); } export function activateRegistryEntryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ActivateRegistryEntryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActivateRegistryEntryRequest' from JSON`, ); }