/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: b6b940df8bd7 */ 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 { EventClassificationName, EventClassificationName$inboundSchema, } from "./eventclassificationname.js"; import { EventStrategyName, EventStrategyName$inboundSchema, } from "./eventstrategyname.js"; /** * A generated classification of a given event. */ export type EventClassification = { /** * The name for a generated classification of an event. */ name?: EventClassificationName | undefined; strategies?: Array | undefined; }; /** @internal */ export const EventClassification$inboundSchema: z.ZodType< EventClassification, z.ZodTypeDef, unknown > = z.object({ name: EventClassificationName$inboundSchema.optional(), strategies: z.array(EventStrategyName$inboundSchema).optional(), }); export function eventClassificationFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => EventClassification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventClassification' from JSON`, ); }