/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 9c8e17fd3f9e */ 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"; /** * @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated. */ export const SensitiveInfoTypeLikelihoodThreshold = { Likely: "LIKELY", VeryLikely: "VERY_LIKELY", Possible: "POSSIBLE", Unlikely: "UNLIKELY", VeryUnlikely: "VERY_UNLIKELY", } as const; /** * @deprecated enum: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated. */ export type SensitiveInfoTypeLikelihoodThreshold = OpenEnum< typeof SensitiveInfoTypeLikelihoodThreshold >; export type SensitiveInfoType = { /** * @deprecated field: Deprecated on 2026-02-05, removal scheduled for 2026-10-15: Field is deprecated. */ likelihoodThreshold?: SensitiveInfoTypeLikelihoodThreshold | undefined; /** * Text representation of an info-type to scan for. */ infoType?: string | undefined; }; /** @internal */ export const SensitiveInfoTypeLikelihoodThreshold$inboundSchema: z.ZodType< SensitiveInfoTypeLikelihoodThreshold, z.ZodTypeDef, unknown > = openEnums.inboundSchema(SensitiveInfoTypeLikelihoodThreshold); /** @internal */ export const SensitiveInfoTypeLikelihoodThreshold$outboundSchema: z.ZodType< string, z.ZodTypeDef, SensitiveInfoTypeLikelihoodThreshold > = openEnums.outboundSchema(SensitiveInfoTypeLikelihoodThreshold); /** @internal */ export const SensitiveInfoType$inboundSchema: z.ZodType< SensitiveInfoType, z.ZodTypeDef, unknown > = z.object({ likelihoodThreshold: SensitiveInfoTypeLikelihoodThreshold$inboundSchema .optional(), infoType: z.string().optional(), }); /** @internal */ export type SensitiveInfoType$Outbound = { likelihoodThreshold?: string | undefined; infoType?: string | undefined; }; /** @internal */ export const SensitiveInfoType$outboundSchema: z.ZodType< SensitiveInfoType$Outbound, z.ZodTypeDef, SensitiveInfoType > = z.object({ likelihoodThreshold: SensitiveInfoTypeLikelihoodThreshold$outboundSchema .optional(), infoType: z.string().optional(), }); export function sensitiveInfoTypeToJSON( sensitiveInfoType: SensitiveInfoType, ): string { return JSON.stringify( SensitiveInfoType$outboundSchema.parse(sensitiveInfoType), ); } export function sensitiveInfoTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SensitiveInfoType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SensitiveInfoType' from JSON`, ); }