/* * 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 { CertificateAsset, CertificateAsset$inboundSchema, } from "./certificateasset.js"; import { HostAssetWithMatchedServices, HostAssetWithMatchedServices$inboundSchema, } from "./hostassetwithmatchedservices.js"; import { WebpropertyAsset, WebpropertyAsset$inboundSchema, } from "./webpropertyasset.js"; export type SearchQueryHit = { certificateV1?: CertificateAsset | undefined; hostV1?: HostAssetWithMatchedServices | undefined; webpropertyV1?: WebpropertyAsset | undefined; }; /** @internal */ export const SearchQueryHit$inboundSchema: z.ZodType< SearchQueryHit, z.ZodTypeDef, unknown > = z.object({ certificate_v1: CertificateAsset$inboundSchema.optional(), host_v1: HostAssetWithMatchedServices$inboundSchema.optional(), webproperty_v1: WebpropertyAsset$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "certificate_v1": "certificateV1", "host_v1": "hostV1", "webproperty_v1": "webpropertyV1", }); }); export function searchQueryHitFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SearchQueryHit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchQueryHit' from JSON`, ); }