/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ 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 { KeyValuePair, KeyValuePair$inboundSchema } from "./keyvaluepair.js"; export type VulnerableAssetScanner = { /** * The scanned asset's Vanta resource id. */ resourceId: string; /** * Integration that the the vulnerable asset is scanned by. */ integrationId: string; /** * Digest of the scanned container image. */ imageDigest: string | null; /** * Push date of the scanned container image. */ imagePushedAtDate: Date | null; /** * Tags of the scanned container image. */ imageTags: Array | null; /** * Tags of the scanned asset. */ assetTags: Array | null; /** * The parent account or organization of the scanned asset. */ parentAccountOrOrganization: string | null; /** * BIOS UUID of the scanned asset. */ biosUuid: string | null; /** * IPV4s of the scanned asset. */ ipv4s: Array | null; /** * IPV6s of the scanned asset. */ ipv6s: Array | null; /** * Mac addresses of the scanned asset. */ macAddresses: Array | null; /** * Host names of the scanned asset. */ hostnames: Array | null; /** * fqdns of the scanned asset. */ fqdns: Array | null; /** * Operating systems of the scanned asset. */ operatingSystems: Array | null; /** * The asset's identifier code. */ targetId: string | null; }; /** @internal */ export const VulnerableAssetScanner$inboundSchema: z.ZodType< VulnerableAssetScanner, z.ZodTypeDef, unknown > = z.object({ resourceId: z.string(), integrationId: z.string(), imageDigest: z.nullable(z.string()), imagePushedAtDate: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ), imageTags: z.nullable(z.array(z.string())), assetTags: z.nullable(z.array(KeyValuePair$inboundSchema)), parentAccountOrOrganization: z.nullable(z.string()), biosUuid: z.nullable(z.string()), ipv4s: z.nullable(z.array(z.string())), ipv6s: z.nullable(z.array(z.string())), macAddresses: z.nullable(z.array(z.string())), hostnames: z.nullable(z.array(z.string())), fqdns: z.nullable(z.array(z.string())), operatingSystems: z.nullable(z.array(z.string())), targetId: z.nullable(z.string()), }); export function vulnerableAssetScannerFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VulnerableAssetScanner$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VulnerableAssetScanner' from JSON`, ); }