/* * 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 { Connection, Connection$inboundSchema } from "./connection.js"; import { Target, Target$inboundSchema } from "./target.js"; export type Iscsi = { connection?: Connection | undefined; errors?: Array | null | undefined; targets?: Array | null | undefined; }; /** @internal */ export const Iscsi$inboundSchema: z.ZodType = z .object({ connection: Connection$inboundSchema.optional(), errors: z.nullable(z.array(z.string())).optional(), targets: z.nullable(z.array(Target$inboundSchema)).optional(), }); export function iscsiFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Iscsi$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Iscsi' from JSON`, ); }