/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2bacc39472b8 */ 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"; import { DlpFindingFilter, DlpFindingFilter$inboundSchema, } from "./dlpfindingfilter.js"; import { DlpIssueFilter, DlpIssueFilter$inboundSchema, } from "./dlpissuefilter.js"; import { DlpPerson, DlpPerson$inboundSchema } from "./dlpperson.js"; /** * The type of export to perform */ export const ExportInfoExportType = { Findings: "FINDINGS", Documents: "DOCUMENTS", Issues: "ISSUES", } as const; /** * The type of export to perform */ export type ExportInfoExportType = OpenEnum; /** * The status of the export */ export const ExportInfoStatus = { Pending: "PENDING", Completed: "COMPLETED", Failed: "FAILED", } as const; /** * The status of the export */ export type ExportInfoStatus = OpenEnum; export type ExportInfo = { /** * Details about the person who created this report/policy. */ createdBy?: DlpPerson | undefined; /** * Timestamp at which this export started. */ startTime?: string | undefined; /** * Timestamp at which this export completed. */ endTime?: string | undefined; /** * The ID of the export */ exportId?: string | undefined; /** * The name of the file to export the findings to */ fileName?: string | undefined; /** * The type of export to perform */ exportType?: ExportInfoExportType | undefined; filter?: DlpFindingFilter | undefined; /** * Filter for DLP issues. Includes document-level filters and issue-specific filters. */ issueFilter?: DlpIssueFilter | undefined; /** * The status of the export */ status?: ExportInfoStatus | undefined; /** * The size of the exported file in bytes */ exportSize?: number | undefined; }; /** @internal */ export const ExportInfoExportType$inboundSchema: z.ZodType< ExportInfoExportType, z.ZodTypeDef, unknown > = openEnums.inboundSchema(ExportInfoExportType); /** @internal */ export const ExportInfoStatus$inboundSchema: z.ZodType< ExportInfoStatus, z.ZodTypeDef, unknown > = openEnums.inboundSchema(ExportInfoStatus); /** @internal */ export const ExportInfo$inboundSchema: z.ZodType< ExportInfo, z.ZodTypeDef, unknown > = z.object({ createdBy: DlpPerson$inboundSchema.optional(), startTime: z.string().optional(), endTime: z.string().optional(), exportId: z.string().optional(), fileName: z.string().optional(), exportType: ExportInfoExportType$inboundSchema.optional(), filter: DlpFindingFilter$inboundSchema.optional(), issueFilter: DlpIssueFilter$inboundSchema.optional(), status: ExportInfoStatus$inboundSchema.optional(), exportSize: z.number().int().optional(), }); export function exportInfoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ExportInfo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExportInfo' from JSON`, ); }