/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export const Tlp = { Unknown: "", Green: "green", Amber: "amber", Red: "red", White: "white", } as const; export type Tlp = OpenEnum; export type ReputationEvidenceExternalSignal = { description?: string | undefined; source?: string | undefined; tlp?: Tlp | undefined; }; /** @internal */ export const Tlp$inboundSchema: z.ZodType = openEnums.inboundSchema(Tlp); /** @internal */ export const ReputationEvidenceExternalSignal$inboundSchema: z.ZodType< ReputationEvidenceExternalSignal, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), source: z.string().optional(), tlp: Tlp$inboundSchema.optional(), }); export function reputationEvidenceExternalSignalFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReputationEvidenceExternalSignal$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReputationEvidenceExternalSignal' from JSON`, ); }