/* * 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 GetApiV3ImagesCanistersCanisterIdPngRequest = { canisterId: string; }; /** @internal */ export const GetApiV3ImagesCanistersCanisterIdPngRequest$inboundSchema: z.ZodType< GetApiV3ImagesCanistersCanisterIdPngRequest, z.ZodTypeDef, unknown > = z.object({ canister_id: z.string(), }).transform((v) => { return remap$(v, { "canister_id": "canisterId", }); }); /** @internal */ export type GetApiV3ImagesCanistersCanisterIdPngRequest$Outbound = { canister_id: string; }; /** @internal */ export const GetApiV3ImagesCanistersCanisterIdPngRequest$outboundSchema: z.ZodType< GetApiV3ImagesCanistersCanisterIdPngRequest$Outbound, z.ZodTypeDef, GetApiV3ImagesCanistersCanisterIdPngRequest > = 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 GetApiV3ImagesCanistersCanisterIdPngRequest$ { /** @deprecated use `GetApiV3ImagesCanistersCanisterIdPngRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV3ImagesCanistersCanisterIdPngRequest$inboundSchema; /** @deprecated use `GetApiV3ImagesCanistersCanisterIdPngRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV3ImagesCanistersCanisterIdPngRequest$outboundSchema; /** @deprecated use `GetApiV3ImagesCanistersCanisterIdPngRequest$Outbound` instead. */ export type Outbound = GetApiV3ImagesCanistersCanisterIdPngRequest$Outbound; } export function getApiV3ImagesCanistersCanisterIdPngRequestToJSON( getApiV3ImagesCanistersCanisterIdPngRequest: GetApiV3ImagesCanistersCanisterIdPngRequest, ): string { return JSON.stringify( GetApiV3ImagesCanistersCanisterIdPngRequest$outboundSchema.parse( getApiV3ImagesCanistersCanisterIdPngRequest, ), ); } export function getApiV3ImagesCanistersCanisterIdPngRequestFromJSON( jsonString: string, ): SafeParseResult< GetApiV3ImagesCanistersCanisterIdPngRequest, SDKValidationError > { return safeParse( jsonString, (x) => GetApiV3ImagesCanistersCanisterIdPngRequest$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetApiV3ImagesCanistersCanisterIdPngRequest' from JSON`, ); }