/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; 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"; export type GetApiV3CanistersCanisterIdNameRequest = { /** * Canister ID */ canisterId: string; }; /** @internal */ export const GetApiV3CanistersCanisterIdNameRequest$inboundSchema: z.ZodType< GetApiV3CanistersCanisterIdNameRequest, z.ZodTypeDef, unknown > = z.object({ canister_id: z.string(), }).transform((v) => { return remap$(v, { "canister_id": "canisterId", }); }); /** @internal */ export type GetApiV3CanistersCanisterIdNameRequest$Outbound = { canister_id: string; }; /** @internal */ export const GetApiV3CanistersCanisterIdNameRequest$outboundSchema: z.ZodType< GetApiV3CanistersCanisterIdNameRequest$Outbound, z.ZodTypeDef, GetApiV3CanistersCanisterIdNameRequest > = z.object({ canisterId: z.string(), }).transform((v) => { return remap$(v, { canisterId: "canister_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV3CanistersCanisterIdNameRequest$ { /** @deprecated use `GetApiV3CanistersCanisterIdNameRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3CanistersCanisterIdNameRequest$inboundSchema; /** @deprecated use `GetApiV3CanistersCanisterIdNameRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3CanistersCanisterIdNameRequest$outboundSchema; /** @deprecated use `GetApiV3CanistersCanisterIdNameRequest$Outbound` instead. */ export type Outbound = GetApiV3CanistersCanisterIdNameRequest$Outbound; } export function getApiV3CanistersCanisterIdNameRequestToJSON( getApiV3CanistersCanisterIdNameRequest: GetApiV3CanistersCanisterIdNameRequest, ): string { return JSON.stringify( GetApiV3CanistersCanisterIdNameRequest$outboundSchema.parse( getApiV3CanistersCanisterIdNameRequest, ), ); } export function getApiV3CanistersCanisterIdNameRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV3CanistersCanisterIdNameRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV3CanistersCanisterIdNameRequest' from JSON`, ); }