/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Host, Host$inboundSchema } from "./host.js"; export type HostAsset = { extensions: { [k: string]: any }; resource: Host; }; /** @internal */ export const HostAsset$inboundSchema: z.ZodType< HostAsset, z.ZodTypeDef, unknown > = z.object({ extensions: z.record(z.any()), resource: Host$inboundSchema, }); export function hostAssetFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HostAsset$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HostAsset' from JSON`, ); }