/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Container for specifying the presence of biological material. */ export type DangerousGoodsBiologicalMaterial = { /** * Indicates if the shipment contains biological material. */ contains?: boolean | undefined; }; /** @internal */ export const DangerousGoodsBiologicalMaterial$inboundSchema: z.ZodMiniType< DangerousGoodsBiologicalMaterial, unknown > = z.object({ contains: z.optional(z.boolean()), }); /** @internal */ export type DangerousGoodsBiologicalMaterial$Outbound = { contains?: boolean | undefined; }; /** @internal */ export const DangerousGoodsBiologicalMaterial$outboundSchema: z.ZodMiniType< DangerousGoodsBiologicalMaterial$Outbound, DangerousGoodsBiologicalMaterial > = z.object({ contains: z.optional(z.boolean()), }); export function dangerousGoodsBiologicalMaterialToJSON( dangerousGoodsBiologicalMaterial: DangerousGoodsBiologicalMaterial, ): string { return JSON.stringify( DangerousGoodsBiologicalMaterial$outboundSchema.parse( dangerousGoodsBiologicalMaterial, ), ); } export function dangerousGoodsBiologicalMaterialFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DangerousGoodsBiologicalMaterial$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DangerousGoodsBiologicalMaterial' from JSON`, ); }