import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import { IotHubGatewayServiceAPIsContext } from "../iotHubGatewayServiceAPIsContext"; /** Class representing a Modules. */ export declare class Modules { private readonly client; /** * Create a Modules. * @param {IotHubGatewayServiceAPIsContext} client Reference to the service client. */ constructor(client: IotHubGatewayServiceAPIsContext); /** * Gets the module twin. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins * for more information. * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param [options] The optional parameters * @returns Promise */ getTwin(id: string, mid: string, options?: msRest.RequestOptionsBase): Promise; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param callback The callback */ getTwin(id: string, mid: string, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param options The optional parameters * @param callback The callback */ getTwin(id: string, mid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; /** * Replaces the tags and desired properties of a module twin. See * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins for more information. * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param deviceTwinInfo The module twin info that will replace the existing info. * @param [options] The optional parameters * @returns Promise */ replaceTwin(id: string, mid: string, deviceTwinInfo: Models.Twin, options?: Models.ModulesReplaceTwinOptionalParams): Promise; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param deviceTwinInfo The module twin info that will replace the existing info. * @param callback The callback */ replaceTwin(id: string, mid: string, deviceTwinInfo: Models.Twin, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param deviceTwinInfo The module twin info that will replace the existing info. * @param options The optional parameters * @param callback The callback */ replaceTwin(id: string, mid: string, deviceTwinInfo: Models.Twin, options: Models.ModulesReplaceTwinOptionalParams, callback: msRest.ServiceCallback): void; /** * Updates the tags and desired properties of a module twin. See * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins for more information. * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param deviceTwinInfo The module twin info containing the tags and desired properties to be * updated. * @param [options] The optional parameters * @returns Promise */ updateTwin(id: string, mid: string, deviceTwinInfo: Models.Twin, options?: Models.ModulesUpdateTwinOptionalParams): Promise; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param deviceTwinInfo The module twin info containing the tags and desired properties to be * updated. * @param callback The callback */ updateTwin(id: string, mid: string, deviceTwinInfo: Models.Twin, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param deviceTwinInfo The module twin info containing the tags and desired properties to be * updated. * @param options The optional parameters * @param callback The callback */ updateTwin(id: string, mid: string, deviceTwinInfo: Models.Twin, options: Models.ModulesUpdateTwinOptionalParams, callback: msRest.ServiceCallback): void; /** * Gets all the module identities on the device. * @param id The unique identifier of the device. * @param [options] The optional parameters * @returns Promise */ getModulesOnDevice(id: string, options?: msRest.RequestOptionsBase): Promise; /** * @param id The unique identifier of the device. * @param callback The callback */ getModulesOnDevice(id: string, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the device. * @param options The optional parameters * @param callback The callback */ getModulesOnDevice(id: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; /** * Gets a module identity on the device. * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param [options] The optional parameters * @returns Promise */ getIdentity(id: string, mid: string, options?: msRest.RequestOptionsBase): Promise; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param callback The callback */ getIdentity(id: string, mid: string, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param options The optional parameters * @param callback The callback */ getIdentity(id: string, mid: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; /** * Creates or updates the module identity for a device in the IoT Hub. The moduleId and * generationId cannot be updated by the user. * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param module The module identity. * @param [options] The optional parameters * @returns Promise */ createOrUpdateIdentity(id: string, mid: string, module: Models.Module, options?: Models.ModulesCreateOrUpdateIdentityOptionalParams): Promise; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param module The module identity. * @param callback The callback */ createOrUpdateIdentity(id: string, mid: string, module: Models.Module, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the device. * @param mid The unique identifier of the module. * @param module The module identity. * @param options The optional parameters * @param callback The callback */ createOrUpdateIdentity(id: string, mid: string, module: Models.Module, options: Models.ModulesCreateOrUpdateIdentityOptionalParams, callback: msRest.ServiceCallback): void; /** * Deletes the module identity for a device in the IoT Hub. * @param id The unique identifier of the deivce. * @param mid The unique identifier of the module. * @param [options] The optional parameters * @returns Promise */ deleteIdentity(id: string, mid: string, options?: Models.ModulesDeleteIdentityOptionalParams): Promise; /** * @param id The unique identifier of the deivce. * @param mid The unique identifier of the module. * @param callback The callback */ deleteIdentity(id: string, mid: string, callback: msRest.ServiceCallback): void; /** * @param id The unique identifier of the deivce. * @param mid The unique identifier of the module. * @param options The optional parameters * @param callback The callback */ deleteIdentity(id: string, mid: string, options: Models.ModulesDeleteIdentityOptionalParams, callback: msRest.ServiceCallback): void; /** * Invokes a direct method on a module of a device. See * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-direct-methods for more information. * @param deviceId The unique identifier of the device. * @param moduleId The unique identifier of the module. * @param directMethodRequest The parameters to execute a direct method on the module. * @param [options] The optional parameters * @returns Promise */ invokeMethod(deviceId: string, moduleId: string, directMethodRequest: Models.CloudToDeviceMethod, options?: msRest.RequestOptionsBase): Promise; /** * @param deviceId The unique identifier of the device. * @param moduleId The unique identifier of the module. * @param directMethodRequest The parameters to execute a direct method on the module. * @param callback The callback */ invokeMethod(deviceId: string, moduleId: string, directMethodRequest: Models.CloudToDeviceMethod, callback: msRest.ServiceCallback): void; /** * @param deviceId The unique identifier of the device. * @param moduleId The unique identifier of the module. * @param directMethodRequest The parameters to execute a direct method on the module. * @param options The optional parameters * @param callback The callback */ invokeMethod(deviceId: string, moduleId: string, directMethodRequest: Models.CloudToDeviceMethod, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; }