/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { APIPromise } from "../types/async.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; let fileStorageDriveGroupsList$module: | Promise | undefined; const fileStorageDriveGroupsList = (( ...args: Parameters< typeof import("../funcs/fileStorageDriveGroupsList.js").fileStorageDriveGroupsList > ) => new APIPromise( (fileStorageDriveGroupsList$module ??= import( "../funcs/fileStorageDriveGroupsList.js" ).catch((error: unknown) => { fileStorageDriveGroupsList$module = undefined; throw error; })).then((module) => module.fileStorageDriveGroupsList(...args).$inspect() ), )) as typeof import("../funcs/fileStorageDriveGroupsList.js").fileStorageDriveGroupsList; let fileStorageDriveGroupsCreate$module: | Promise | undefined; const fileStorageDriveGroupsCreate = (( ...args: Parameters< typeof import("../funcs/fileStorageDriveGroupsCreate.js").fileStorageDriveGroupsCreate > ) => new APIPromise( (fileStorageDriveGroupsCreate$module ??= import( "../funcs/fileStorageDriveGroupsCreate.js" ).catch((error: unknown) => { fileStorageDriveGroupsCreate$module = undefined; throw error; })).then((module) => module.fileStorageDriveGroupsCreate(...args).$inspect() ), )) as typeof import("../funcs/fileStorageDriveGroupsCreate.js").fileStorageDriveGroupsCreate; let fileStorageDriveGroupsGet$module: | Promise | undefined; const fileStorageDriveGroupsGet = (( ...args: Parameters< typeof import("../funcs/fileStorageDriveGroupsGet.js").fileStorageDriveGroupsGet > ) => new APIPromise( (fileStorageDriveGroupsGet$module ??= import( "../funcs/fileStorageDriveGroupsGet.js" ).catch((error: unknown) => { fileStorageDriveGroupsGet$module = undefined; throw error; })).then((module) => module.fileStorageDriveGroupsGet(...args).$inspect() ), )) as typeof import("../funcs/fileStorageDriveGroupsGet.js").fileStorageDriveGroupsGet; let fileStorageDriveGroupsUpdate$module: | Promise | undefined; const fileStorageDriveGroupsUpdate = (( ...args: Parameters< typeof import("../funcs/fileStorageDriveGroupsUpdate.js").fileStorageDriveGroupsUpdate > ) => new APIPromise( (fileStorageDriveGroupsUpdate$module ??= import( "../funcs/fileStorageDriveGroupsUpdate.js" ).catch((error: unknown) => { fileStorageDriveGroupsUpdate$module = undefined; throw error; })).then((module) => module.fileStorageDriveGroupsUpdate(...args).$inspect() ), )) as typeof import("../funcs/fileStorageDriveGroupsUpdate.js").fileStorageDriveGroupsUpdate; let fileStorageDriveGroupsDelete$module: | Promise | undefined; const fileStorageDriveGroupsDelete = (( ...args: Parameters< typeof import("../funcs/fileStorageDriveGroupsDelete.js").fileStorageDriveGroupsDelete > ) => new APIPromise( (fileStorageDriveGroupsDelete$module ??= import( "../funcs/fileStorageDriveGroupsDelete.js" ).catch((error: unknown) => { fileStorageDriveGroupsDelete$module = undefined; throw error; })).then((module) => module.fileStorageDriveGroupsDelete(...args).$inspect() ), )) as typeof import("../funcs/fileStorageDriveGroupsDelete.js").fileStorageDriveGroupsDelete; export class DriveGroups extends ClientSDK { /** * List DriveGroups * * @remarks * List DriveGroups */ async list( request: operations.FileStorageDriveGroupsAllRequest, options?: RequestOptions, ): Promise< PageIterator< operations.FileStorageDriveGroupsAllResponse, { cursor: string } > > { return unwrapResultIterator(fileStorageDriveGroupsList( this, request, options, )); } /** * Create DriveGroup * * @remarks * Create DriveGroup */ async create( request: operations.FileStorageDriveGroupsAddRequest, options?: RequestOptions, ): Promise { return unwrapAsync(fileStorageDriveGroupsCreate( this, request, options, )); } /** * Get DriveGroup * * @remarks * Get DriveGroup */ async get( request: operations.FileStorageDriveGroupsOneRequest, options?: RequestOptions, ): Promise { return unwrapAsync(fileStorageDriveGroupsGet( this, request, options, )); } /** * Update DriveGroup * * @remarks * Update DriveGroup */ async update( request: operations.FileStorageDriveGroupsUpdateRequest, options?: RequestOptions, ): Promise { return unwrapAsync(fileStorageDriveGroupsUpdate( this, request, options, )); } /** * Delete DriveGroup * * @remarks * Delete DriveGroup */ async delete( request: operations.FileStorageDriveGroupsDeleteRequest, options?: RequestOptions, ): Promise { return unwrapAsync(fileStorageDriveGroupsDelete( this, request, options, )); } }