/* * 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"; export type SmbSmbCapabilities = { /** * Server supports Distributed File System */ smbDfsSupport?: boolean | undefined; /** * Server supports directory leasing */ smbDirectoryLeasingSupport?: boolean | undefined; /** * Server supports encryption */ smbEncryptionSupport?: boolean | undefined; /** * Server supports Leasing */ smbLeasingSupport?: boolean | undefined; /** * Server supports multiple channels per session */ smbMultichanSupport?: boolean | undefined; /** * Server supports multi-credit operations */ smbMulticreditSupport?: boolean | undefined; /** * Server supports persistent handles */ smbPersistentHandleSupport?: boolean | undefined; }; /** @internal */ export const SmbSmbCapabilities$inboundSchema: z.ZodType< SmbSmbCapabilities, z.ZodTypeDef, unknown > = z.object({ smb_dfs_support: z.boolean().optional(), smb_directory_leasing_support: z.boolean().optional(), smb_encryption_support: z.boolean().optional(), smb_leasing_support: z.boolean().optional(), smb_multichan_support: z.boolean().optional(), smb_multicredit_support: z.boolean().optional(), smb_persistent_handle_support: z.boolean().optional(), }).transform((v) => { return remap$(v, { "smb_dfs_support": "smbDfsSupport", "smb_directory_leasing_support": "smbDirectoryLeasingSupport", "smb_encryption_support": "smbEncryptionSupport", "smb_leasing_support": "smbLeasingSupport", "smb_multichan_support": "smbMultichanSupport", "smb_multicredit_support": "smbMulticreditSupport", "smb_persistent_handle_support": "smbPersistentHandleSupport", }); }); export function smbSmbCapabilitiesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => SmbSmbCapabilities$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SmbSmbCapabilities' from JSON`, ); }