/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { SmbNegotiationLog, SmbNegotiationLog$inboundSchema, } from "./smbnegotiationlog.js"; import { SmbSessionSetupLog, SmbSessionSetupLog$inboundSchema, } from "./smbsessionsetuplog.js"; import { SmbSmbCapabilities, SmbSmbCapabilities$inboundSchema, } from "./smbsmbcapabilities.js"; import { SmbSmbVersions, SmbSmbVersions$inboundSchema, } from "./smbsmbversions.js"; export type Smb = { /** * Default group name */ groupName?: string | undefined; /** * Server supports the NTLM authentication method */ hasNtlm?: boolean | undefined; /** * Server-identified operating system */ nativeOs?: string | undefined; negotiationLog?: SmbNegotiationLog | undefined; /** * Native LAN manager */ ntlm?: string | undefined; sessionSetupLog?: SmbSessionSetupLog | undefined; smbCapabilities?: SmbSmbCapabilities | undefined; smbVersion?: SmbSmbVersions | undefined; smbv1Support?: boolean | undefined; }; /** @internal */ export const Smb$inboundSchema: z.ZodType = z .object({ group_name: z.string().optional(), has_ntlm: z.boolean().optional(), native_os: z.string().optional(), negotiation_log: SmbNegotiationLog$inboundSchema.optional(), ntlm: z.string().optional(), session_setup_log: SmbSessionSetupLog$inboundSchema.optional(), smb_capabilities: SmbSmbCapabilities$inboundSchema.optional(), smb_version: SmbSmbVersions$inboundSchema.optional(), smbv1_support: z.boolean().optional(), }).transform((v) => { return remap$(v, { "group_name": "groupName", "has_ntlm": "hasNtlm", "native_os": "nativeOs", "negotiation_log": "negotiationLog", "session_setup_log": "sessionSetupLog", "smb_capabilities": "smbCapabilities", "smb_version": "smbVersion", "smbv1_support": "smbv1Support", }); }); export function smbFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Smb$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Smb' from JSON`, ); }