/* * 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 { Host, Host$inboundSchema } from "./host.js"; import { MatchedService, MatchedService$inboundSchema, } from "./matchedservice.js"; export type HostAssetWithMatchedServices = { extensions: { [k: string]: any }; /** * The host services that match the query. */ matchedServices?: Array | null | undefined; resource: Host; }; /** @internal */ export const HostAssetWithMatchedServices$inboundSchema: z.ZodType< HostAssetWithMatchedServices, z.ZodTypeDef, unknown > = z.object({ extensions: z.record(z.any()), matched_services: z.nullable(z.array(MatchedService$inboundSchema)) .optional(), resource: Host$inboundSchema, }).transform((v) => { return remap$(v, { "matched_services": "matchedServices", }); }); export function hostAssetWithMatchedServicesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HostAssetWithMatchedServices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HostAssetWithMatchedServices' from JSON`, ); }