diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md b/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
index e429c29ed32c..fb5a3bd9eb88 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
@@ -1,14 +1,252 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.1.0-beta.1 (2026-07-08)
### Features Added
-### Breaking Changes
+* `models.StepType` was added
-### Bugs Fixed
+* `models.DeviceClass` was added
-### Other Changes
+* `models.OperationStatus` was added
+
+* `models.DeviceHealth` was added
+
+* `models.DeviceClassSubgroupDeploymentState` was added
+
+* `models.DeviceUpdateAgentId` was added
+
+* `models.UpdateId` was added
+
+* `models.DeviceClassSubgroupDeploymentStatus` was added
+
+* `models.Step` was added
+
+* `models.ImportType` was added
+
+* `models.LogCollectionOperationDetailedStatus` was added
+
+* `models.UpdateFile` was added
+
+* `models.DeviceDeploymentState` was added
+
+* `models.LogCollection` was added
+
+* `models.Error` was added
+
+* `models.PatchBody` was added
+
+* `models.UpdateOperation` was added
+
+* `models.Group` was added
+
+* `models.UpdateFileDownloadHandler` was added
+
+* `models.InstallResult` was added
+
+* `models.StepResult` was added
+
+* `models.DeploymentStatus` was added
+
+* `models.HealthCheck` was added
+
+* `models.FileImportMetadata` was added
+
+* `models.InnerError` was added
+
+* `models.GroupType` was added
+
+* `models.CloudInitiatedRollbackPolicyFailure` was added
+
+* `models.UpdateCompliance` was added
+
+* `models.Deployment` was added
+
+* `models.ImportUpdateInputItem` was added
+
+* `models.DownloadSecurity` was added
+
+* `models.UpdateFileBase` was added
+
+* `models.Device` was added
+
+* `models.DeviceOperation` was added
+
+* `models.UpdateInfo` was added
+
+* `models.DeploymentDeviceState` was added
+
+* `models.DeviceClassSubgroupUpdatableDevices` was added
+
+* `models.LogCollectionOperationDeviceStatus` was added
+
+* `models.HealthCheckResult` was added
+
+* `models.Update` was added
+
+* `models.DeviceHealthState` was added
+
+* `models.Instructions` was added
+
+* `models.Compatibility` was added
+
+* `models.DeviceClassSubgroup` was added
+
+* `models.ContractModel` was added
+
+* `models.CloudInitiatedRollbackPolicy` was added
+
+* `models.DeviceClassProperties` was added
+
+* `models.DeploymentState` was added
+
+* `models.ImportManifestMetadata` was added
+
+#### `DeviceUpdateClient` was modified
+
+* `getUpdate(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getOperationStatus(java.lang.String,java.lang.String)` was added
+* `listUpdates()` was added
+* `listFiles(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getOperationStatus(java.lang.String)` was added
+* `listVersions(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listVersions(java.lang.String,java.lang.String)` was added
+* `beginImportUpdate(java.util.List)` was added
+* `getFile(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `listNames(java.lang.String)` was added
+* `beginDeleteUpdate(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getUpdate(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `listOperationStatuses(java.lang.String,java.lang.Integer)` was added
+* `listOperationStatuses()` was added
+* `listUpdates(java.lang.String,java.lang.String)` was added
+* `getFile(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `listProviders()` was added
+
+#### `DeviceManagementAsyncClient` was modified
+
+* `getDeviceClassSubgroupDeploymentStatus(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getDeploymentForDeviceClassSubgroup(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listDeviceStatesForDeviceClassSubgroupDeployment(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `startLogCollection(java.lang.String,models.LogCollection)` was added
+* `listDeviceClasses(java.lang.String)` was added
+* `updateDeviceClass(java.lang.String,models.PatchBody)` was added
+* `deleteGroup(java.lang.String)` was added
+* `getDeviceModule(java.lang.String,java.lang.String)` was added
+* `getUpdateComplianceForGroup(java.lang.String)` was added
+* `getOperationStatus(java.lang.String)` was added
+* `listBestUpdatesForGroup(java.lang.String)` was added
+* `deleteDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `getBestUpdatesForDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `listDevices()` was added
+* `getOperationStatus(java.lang.String,java.lang.String)` was added
+* `listDeviceClassSubgroupsForGroup(java.lang.String,java.lang.String)` was added
+* `listGroups()` was added
+* `listDeploymentsForGroup(java.lang.String)` was added
+* `getUpdateCompliance()` was added
+* `listDeviceClasses()` was added
+* `getGroup(java.lang.String)` was added
+* `beginImportDevices(models.ImportType)` was added
+* `listDeploymentsForGroup(java.lang.String,java.lang.String)` was added
+* `deleteDeployment(java.lang.String,java.lang.String)` was added
+* `listDeviceStatesForDeviceClassSubgroupDeployment(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listDeploymentsForDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `getDeployment(java.lang.String,java.lang.String)` was added
+* `listHealthOfDevices(java.lang.String)` was added
+* `listDeviceClassSubgroupsForGroup(java.lang.String)` was added
+* `listOperationStatuses()` was added
+* `retryDeployment(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listDevices(java.lang.String)` was added
+* `listLogCollections()` was added
+* `listInstallableUpdatesForDeviceClass(java.lang.String)` was added
+* `getLogCollectionDetailedStatus(java.lang.String)` was added
+* `listGroups(java.lang.String)` was added
+* `getDevice(java.lang.String)` was added
+* `listDeploymentsForDeviceClassSubgroup(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `getLogCollection(java.lang.String)` was added
+* `listOperationStatuses(java.lang.String,java.lang.Integer)` was added
+* `getDeploymentStatus(java.lang.String,java.lang.String)` was added
+* `getDeviceClass(java.lang.String)` was added
+* `createOrUpdateDeployment(java.lang.String,java.lang.String,models.Deployment)` was added
+* `getDeviceClassSubgroupUpdateCompliance(java.lang.String,java.lang.String)` was added
+* `stopDeployment(java.lang.String,java.lang.String,java.lang.String)` was added
+* `deleteDeploymentForDeviceClassSubgroup(java.lang.String,java.lang.String,java.lang.String)` was added
+* `deleteDeviceClass(java.lang.String)` was added
+
+#### `DeviceManagementClient` was modified
+
+* `listDeploymentsForDeviceClassSubgroup(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listDeviceClasses(java.lang.String)` was added
+* `listDeviceClassSubgroupsForGroup(java.lang.String)` was added
+* `listLogCollections()` was added
+* `listBestUpdatesForGroup(java.lang.String)` was added
+* `getDeviceModule(java.lang.String,java.lang.String)` was added
+* `getDevice(java.lang.String)` was added
+* `listHealthOfDevices(java.lang.String)` was added
+* `getLogCollectionDetailedStatus(java.lang.String)` was added
+* `updateDeviceClass(java.lang.String,models.PatchBody)` was added
+* `listDeploymentsForGroup(java.lang.String,java.lang.String)` was added
+* `listDeviceStatesForDeviceClassSubgroupDeployment(java.lang.String,java.lang.String,java.lang.String)` was added
+* `deleteDeploymentForDeviceClassSubgroup(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getUpdateComplianceForGroup(java.lang.String)` was added
+* `deleteDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `retryDeployment(java.lang.String,java.lang.String,java.lang.String)` was added
+* `deleteGroup(java.lang.String)` was added
+* `stopDeployment(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getGroup(java.lang.String)` was added
+* `getUpdateCompliance()` was added
+* `listDevices(java.lang.String)` was added
+* `listInstallableUpdatesForDeviceClass(java.lang.String)` was added
+* `listDeviceClassSubgroupsForGroup(java.lang.String,java.lang.String)` was added
+* `listOperationStatuses()` was added
+* `getBestUpdatesForDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `createOrUpdateDeployment(java.lang.String,java.lang.String,models.Deployment)` was added
+* `listDevices()` was added
+* `getDeploymentStatus(java.lang.String,java.lang.String)` was added
+* `listDeploymentsForGroup(java.lang.String)` was added
+* `listGroups()` was added
+* `getDeployment(java.lang.String,java.lang.String)` was added
+* `getDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `deleteDeviceClass(java.lang.String)` was added
+* `getDeviceClassSubgroupUpdateCompliance(java.lang.String,java.lang.String)` was added
+* `startLogCollection(java.lang.String,models.LogCollection)` was added
+* `listOperationStatuses(java.lang.String,java.lang.Integer)` was added
+* `deleteDeployment(java.lang.String,java.lang.String)` was added
+* `listDeploymentsForDeviceClassSubgroup(java.lang.String,java.lang.String)` was added
+* `getDeviceClassSubgroupDeploymentStatus(java.lang.String,java.lang.String,java.lang.String)` was added
+* `beginImportDevices(models.ImportType)` was added
+* `getOperationStatus(java.lang.String,java.lang.String)` was added
+* `getOperationStatus(java.lang.String)` was added
+* `listDeviceStatesForDeviceClassSubgroupDeployment(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `getLogCollection(java.lang.String)` was added
+* `listGroups(java.lang.String)` was added
+* `getDeploymentForDeviceClassSubgroup(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listDeviceClasses()` was added
+* `getDeviceClass(java.lang.String)` was added
+
+#### `DeviceUpdateServiceVersion` was modified
+
+* `V2026_06_01` was added
+
+#### `DeviceUpdateAsyncClient` was modified
+
+* `beginDeleteUpdate(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getOperationStatus(java.lang.String)` was added
+* `getUpdate(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listProviders()` was added
+* `listFiles(java.lang.String,java.lang.String,java.lang.String)` was added
+* `listVersions(java.lang.String,java.lang.String,java.lang.String)` was added
+* `getFile(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `getUpdate(java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `listOperationStatuses(java.lang.String,java.lang.Integer)` was added
+* `listNames(java.lang.String)` was added
+* `listOperationStatuses()` was added
+* `beginImportUpdate(java.util.List)` was added
+* `listUpdates()` was added
+* `listVersions(java.lang.String,java.lang.String)` was added
+* `getOperationStatus(java.lang.String,java.lang.String)` was added
+* `getFile(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)` was added
+* `listUpdates(java.lang.String,java.lang.String)` was added
## 1.0.33 (2026-05-05)
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/assets.json b/sdk/deviceupdate/azure-iot-deviceupdate/assets.json
index 0d79c9c10a09..e3e253f3106a 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/assets.json
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/deviceupdate/azure-iot-deviceupdate",
- "Tag": "java/deviceupdate/azure-iot-deviceupdate_e6c0b7421b"
+ "Tag": "java/deviceupdate/azure-iot-deviceupdate_4a925a77df"
}
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/customization/src/main/java/DeviceUpdateCustomization.java b/sdk/deviceupdate/azure-iot-deviceupdate/customization/src/main/java/DeviceUpdateCustomization.java
new file mode 100644
index 000000000000..808e7e3a85f1
--- /dev/null
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/customization/src/main/java/DeviceUpdateCustomization.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+import com.azure.autorest.customization.ClassCustomization;
+import com.azure.autorest.customization.Customization;
+import com.azure.autorest.customization.LibraryCustomization;
+import com.github.javaparser.StaticJavaParser;
+import org.slf4j.Logger;
+
+/**
+ * Customization that preserves backward compatibility of the {@code beginDeleteUpdate} long-running
+ * operation's protocol overloads.
+ *
+ *
The prior GA library ({@code azure-iot-deviceupdate} 1.0.x) shipped these protocol LRO overloads
+ * with a final-result type of {@code BinaryData}. After migrating to TypeSpec, the emitter derives the
+ * final-result type as {@code Void} (the delete operation has an empty {@code 204} response), which is a
+ * binary breaking change: {@code SyncPoller} became {@code SyncPoller}
+ * (and the async {@code PollerFlux} equivalent).
+ *
+ * This cannot be expressed in {@code client.tsp}/{@code tspconfig.yaml}, so this customization restores the
+ * final-result type to {@code BinaryData} on the public sync/async clients and on the underlying implementation
+ * client (both the method return type and the poller's final-result {@link com.azure.core.util.serializer.TypeReference}).
+ */
+public class DeviceUpdateCustomization extends Customization {
+
+ private static final String ROOT_PACKAGE = "com.azure.iot.deviceupdate";
+ private static final String IMPL_PACKAGE = "com.azure.iot.deviceupdate.implementation";
+
+ @Override
+ public void customize(LibraryCustomization libraryCustomization, Logger logger) {
+ logger.info("Restoring 'beginDeleteUpdate' protocol overload final-result type to BinaryData for backward compatibility.");
+
+ // Public clients: only the method return type needs to change; the body simply delegates to the
+ // implementation client, whose return type is retyped below.
+ restoreBinaryDataFinalResult(libraryCustomization.getClass(ROOT_PACKAGE, "DeviceUpdateClient"),
+ "beginDeleteUpdate", false);
+ restoreBinaryDataFinalResult(libraryCustomization.getClass(ROOT_PACKAGE, "DeviceUpdateAsyncClient"),
+ "beginDeleteUpdate", false);
+
+ // Implementation client: retype the method and rewrite the poller's final-result TypeReference.
+ ClassCustomization impl = libraryCustomization.getClass(IMPL_PACKAGE, "DeviceUpdateClientImpl");
+ restoreBinaryDataFinalResult(impl, "beginDeleteUpdate", true);
+ restoreBinaryDataFinalResult(impl, "beginDeleteUpdateAsync", true);
+ }
+
+ /**
+ * Retypes the protocol overload of {@code methodName} from {@code } back to
+ * {@code }. Only the protocol overload (whose return type is exactly
+ * {@code SyncPoller} or {@code PollerFlux}) is affected; the model
+ * convenience overloads ({@code }) are left untouched.
+ *
+ * @param classCustomization the class to customize.
+ * @param methodName the method name to retype.
+ * @param rewriteFinalResultTypeReference when {@code true}, also rewrites
+ * {@code TypeReference.createInstance(Void.class)} to {@code TypeReference.createInstance(BinaryData.class)}
+ * in the method body (needed for the implementation client that constructs the poller).
+ */
+ private static void restoreBinaryDataFinalResult(ClassCustomization classCustomization, String methodName,
+ boolean rewriteFinalResultTypeReference) {
+ classCustomization.customizeAst(ast -> ast.getClassByName(classCustomization.getClassName())
+ .ifPresent(clazz -> clazz.getMethodsByName(methodName).forEach(method -> {
+ String returnType = method.getTypeAsString().replace(" ", "");
+ if (!returnType.equals("SyncPoller")
+ && !returnType.equals("PollerFlux")) {
+ return;
+ }
+
+ method.setType(StaticJavaParser.parseType(method.getTypeAsString().replace("Void", "BinaryData")));
+
+ if (rewriteFinalResultTypeReference) {
+ method.getBody().ifPresent(body -> method.setBody(StaticJavaParser.parseBlock(
+ body.toString().replace("TypeReference.createInstance(Void.class)",
+ "TypeReference.createInstance(BinaryData.class)"))));
+ }
+ })));
+ }
+}
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java
index 6a0bd0204814..ae5a003e09b2 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementAsyncClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.iot.deviceupdate;
@@ -12,85 +12,107 @@
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
+import com.azure.core.util.FluxUtil;
import com.azure.core.util.polling.PollerFlux;
-import com.azure.iot.deviceupdate.implementation.DeviceManagementsImpl;
+import com.azure.iot.deviceupdate.implementation.DeviceManagementClientImpl;
+import com.azure.iot.deviceupdate.implementation.JsonMergePatchHelper;
+import com.azure.iot.deviceupdate.models.Deployment;
+import com.azure.iot.deviceupdate.models.DeploymentDeviceState;
+import com.azure.iot.deviceupdate.models.DeploymentStatus;
+import com.azure.iot.deviceupdate.models.Device;
+import com.azure.iot.deviceupdate.models.DeviceClass;
+import com.azure.iot.deviceupdate.models.DeviceClassSubgroup;
+import com.azure.iot.deviceupdate.models.DeviceClassSubgroupDeploymentStatus;
+import com.azure.iot.deviceupdate.models.DeviceClassSubgroupUpdatableDevices;
+import com.azure.iot.deviceupdate.models.DeviceHealth;
+import com.azure.iot.deviceupdate.models.DeviceOperation;
+import com.azure.iot.deviceupdate.models.Group;
+import com.azure.iot.deviceupdate.models.ImportType;
+import com.azure.iot.deviceupdate.models.LogCollection;
+import com.azure.iot.deviceupdate.models.LogCollectionOperationDetailedStatus;
+import com.azure.iot.deviceupdate.models.PatchBody;
+import com.azure.iot.deviceupdate.models.UpdateCompliance;
+import com.azure.iot.deviceupdate.models.UpdateInfo;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the asynchronous DeviceUpdateClient type. */
+/**
+ * Initializes a new instance of the asynchronous DeviceManagementClient type.
+ */
@ServiceClient(builder = DeviceManagementClientBuilder.class, isAsync = true)
public final class DeviceManagementAsyncClient {
@Generated
- private final DeviceManagementsImpl serviceClient;
+ private final DeviceManagementClientImpl serviceClient;
/**
* Initializes an instance of DeviceManagementAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
- DeviceManagementAsyncClient(DeviceManagementsImpl serviceClient) {
+ DeviceManagementAsyncClient(DeviceManagementClientImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
- * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and
- * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device
- * Update for IoT Hub.
- *
- * Query Parameters
- *
+ * Gets a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of device classes returned. You can filter on friendly name. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of device classes returned. You can filter on
+ * friendly name. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceClassId: String (Required)
- * friendlyName: String (Optional)
- * deviceClassProperties (Required): {
- * contractModel (Optional): {
- * id: String (Required)
- * name: String (Required)
- * }
- * compatProperties (Required): {
- * String: String (Required)
- * }
- * }
- * bestCompatibleUpdate (Optional): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
+ * deviceClassId: String (Required)
+ * friendlyName: String (Optional)
+ * deviceClassProperties (Required): {
+ * contractModel (Optional): {
+ * id: String (Required)
+ * name: String (Required)
* }
- * ]
- * nextLink: String (Optional)
+ * compatProperties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * bestCompatibleUpdate (Optional): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
* }
- * }
- *
+ * }
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and
- * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device
- * Update for IoT Hub as paginated response with {@link PagedFlux}.
+ * @return a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -100,10 +122,10 @@ public PagedFlux listDeviceClasses(RequestOptions requestOptions) {
/**
* Gets the properties of a device class.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceClassId: String (Required)
* friendlyName: String (Optional)
@@ -126,8 +148,9 @@ public PagedFlux listDeviceClasses(RequestOptions requestOptions) {
* friendlyName: String (Optional)
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -144,18 +167,20 @@ public Mono> getDeviceClassWithResponse(String deviceClassI
/**
* Update device class details.
- *
- * Request Body Schema
- *
- *
{@code
+ * Request Body Schema
+ *
+ *
+ * {@code
* {
- * friendlyName: String (Required)
+ * friendlyName: String (Optional, Required on create)
* }
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceClassId: String (Required)
* friendlyName: String (Optional)
@@ -178,10 +203,12 @@ public Mono> getDeviceClassWithResponse(String deviceClassI
* friendlyName: String (Optional)
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceClassId Device class identifier.
- * @param deviceClassPatch The device class json merge patch body. Currently only supports patching friendlyName.
+ * @param deviceClassPatch The device class json merge patch body. Currently only supports patching
+ * friendlyName.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -197,12 +224,14 @@ public Mono> updateDeviceClassWithResponse(String deviceCla
}
/**
- * Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected
- * to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user
- * has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the
- * records from the system and to stop checking the compatibility of this device class with new updates. If a device
- * is ever reconnected for this device class it will be re-created.
- *
+ * Deletes a device class. Device classes are created automatically when Device
+ * Update-enabled devices are connected to the hub but are not automatically
+ * cleaned up since they are referenced by DeviceClassSubgroups. If the user has
+ * deleted all DeviceClassSubgroups for a device class they can also delete the
+ * device class to remove the records from the system and to stop checking the
+ * compatibility of this device class with new updates. If a device is ever
+ * reconnected for this device class it will be re-created.
+ *
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -219,26 +248,22 @@ public Mono> deleteDeviceClassWithResponse(String deviceClassId,
/**
* Gets a list of installable updates for a device class.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * ]
- * nextLink: String (Optional)
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -256,60 +281,56 @@ public PagedFlux listInstallableUpdatesForDeviceClass(String deviceC
/**
* Gets a list of devices connected to Device Update for IoT Hub.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of devices returned. You can filter on GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with no deployment status (that have never been deployed to). |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of devices returned. You can filter on
+ * GroupId,
+ * DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to
+ * query for devices with no deployment status (that have never been deployed to). |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * deviceClassId: String (Required)
- * groupId: String (Optional)
- * lastAttemptedUpdate (Optional): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
+ * deviceClassId: String (Required)
+ * groupId: String (Optional)
+ * lastAttemptedUpdate (Optional): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+ * installedUpdate (Optional): (recursive schema, see installedUpdate above)
+ * onLatestUpdate: boolean (Required)
+ * lastDeploymentId: String (Optional)
+ * lastInstallResult (Optional): {
+ * resultCode: int (Required)
+ * extendedResultCode: int (Required)
+ * resultDetails: String (Optional)
+ * stepResults (Optional): [
+ * (Optional){
+ * update (Optional): (recursive schema, see update above)
* description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
- * installedUpdate (Optional): (recursive schema, see installedUpdate above)
- * onLatestUpdate: boolean (Required)
- * lastDeploymentId: String (Optional)
- * lastInstallResult (Optional): {
* resultCode: int (Required)
* extendedResultCode: int (Required)
* resultDetails: String (Optional)
- * stepResults (Optional): [
- * (Optional){
- * update (Optional): (recursive schema, see update above)
- * description: String (Optional)
- * resultCode: int (Required)
- * extendedResultCode: int (Required)
- * resultDetails: String (Optional)
- * }
- * ]
* }
- * }
- * ]
- * nextLink: String (Optional)
+ * ]
+ * }
+ * }
* }
- * }
- *
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -324,15 +345,16 @@ public PagedFlux listDevices(RequestOptions requestOptions) {
}
/**
- * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header
- * value to check for operation status.
- *
- * Request Body Schema
- *
- *
{@code
+ * Import existing devices from IoT Hub. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
+ * Request Body Schema
+ *
+ *
+ * {@code
* String(Devices/Modules/All)
- * }
- *
+ * }
+ *
+ *
* @param importType The types of devices to import.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -348,11 +370,12 @@ public PollerFlux beginImportDevices(BinaryData importTy
}
/**
- * Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceId: String (Required)
* moduleId: String (Optional)
@@ -386,16 +409,17 @@ public PollerFlux beginImportDevices(BinaryData importTy
* ]
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceId Device identifier in Azure IoT Hub.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the device properties and latest deployment status for a device connected to Device Update for IoT Hub
- * along with {@link Response} on successful completion of {@link Mono}.
+ * @return the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -404,12 +428,12 @@ public Mono> getDeviceWithResponse(String deviceId, Request
}
/**
- * Gets the device module properties and latest deployment status for a device module connected to Device Update for
- * IoT Hub.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceId: String (Required)
* moduleId: String (Optional)
@@ -443,8 +467,9 @@ public Mono> getDeviceWithResponse(String deviceId, Request
* ]
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceId Device identifier in Azure IoT Hub.
* @param moduleId Device module identifier in Azure IoT Hub.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -452,8 +477,9 @@ public Mono> getDeviceWithResponse(String deviceId, Request
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the device module properties and latest deployment status for a device module connected to Device Update
- * for IoT Hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -463,27 +489,29 @@ public Mono> getDeviceModuleWithResponse(String deviceId, S
}
/**
- * Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress
- * receiving new updates.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* totalDeviceCount: int (Required)
* onLatestUpdateDeviceCount: int (Required)
* newUpdatesAvailableDeviceCount: int (Required)
* updatesInProgressDeviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the breakdown of how many devices are on their latest update, have new updates available, or are in
- * progress receiving new updates along with {@link Response} on successful completion of {@link Mono}.
+ * @return the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -492,40 +520,37 @@ public Mono> getUpdateComplianceWithResponse(RequestOptions
}
/**
- * Gets a list of all device groups. The $default group will always be returned first.
- *
- * Query Parameters
- *
+ * Gets a list of all device groups. The $default group will always be returned
+ * first.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | orderby | String | No | Orders the set of groups returned. You can order by groupId, deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | orderby | String | No | Orders the set of groups returned. You can order by groupId,
+ * deviceCount,
+ * createdDate, subgroupsWithNewUpdatesAvailableCount,
+ * subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * groupId: String (Required)
- * groupType: String(IoTHubTag/DefaultNoTag) (Required)
- * createdDateTime: String (Required)
- * deviceCount: Integer (Optional)
- * subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
- * subgroupsWithUpdatesInProgressCount: Integer (Optional)
- * subgroupsWithOnLatestUpdateCount: Integer (Optional)
- * deployments (Optional): [
- * String (Optional)
- * ]
- * }
+ * groupId: String (Required)
+ * groupType: String(IoTHubTag/DefaultNoTag) (Required)
+ * createdDateTime: String (Required)
+ * deviceCount: Integer (Optional)
+ * subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+ * subgroupsWithUpdatesInProgressCount: Integer (Optional)
+ * subgroupsWithOnLatestUpdateCount: Integer (Optional)
+ * deployments (Optional): [
+ * String (Optional)
* ]
- * nextLink: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -541,10 +566,10 @@ public PagedFlux listGroups(RequestOptions requestOptions) {
/**
* Gets the device group properties.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* groupType: String(IoTHubTag/DefaultNoTag) (Required)
@@ -557,8 +582,9 @@ public PagedFlux listGroups(RequestOptions requestOptions) {
* String (Optional)
* ]
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -574,12 +600,14 @@ public Mono> getGroupWithResponse(String groupId, RequestOp
}
/**
- * Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to
- * the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are
- * retained for history purposes. Users can call this method to delete a group if they do not need to retain any of
- * the history of the group and no longer need it. If a device is ever connected again for this group after the
- * group was deleted it will be automatically re-created but there will be no history.
- *
+ * Deletes a device group. This group is automatically created when a Device
+ * Update-enabled device is connected to the hub and reports its properties.
+ * Groups, subgroups, and deployments are not automatically cleaned up but are
+ * retained for history purposes. Users can call this method to delete a group if
+ * they do not need to retain any of the history of the group and no longer need
+ * it. If a device is ever connected again for this group after the group was
+ * deleted it will be automatically re-created but there will be no history.
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -595,29 +623,31 @@ public Mono> deleteGroupWithResponse(String groupId, RequestOptio
}
/**
- * Get device group update compliance information such as how many devices are on their latest update, how many need
- * new updates, and how many are in progress on receiving a new update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* totalDeviceCount: int (Required)
* onLatestUpdateDeviceCount: int (Required)
* newUpdatesAvailableDeviceCount: int (Required)
* updatesInProgressDeviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return device group update compliance information such as how many devices are on their latest update, how many
- * need new updates, and how many are in progress on receiving a new update along with {@link Response} on
- * successful completion of {@link Mono}.
+ * @return device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -627,40 +657,37 @@ public Mono> getUpdateComplianceForGroupWithResponse(String
}
/**
- * Get the best available updates for a device group and a count of how many devices need each update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get the best available updates for a device group and a count of how many
+ * devices need each update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * groupId: String (Required)
- * deviceClassId: String (Required)
- * update (Required): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * deviceCount: int (Required)
+ * groupId: String (Required)
+ * deviceClassId: String (Required)
+ * update (Required): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
- * ]
- * nextLink: String (Optional)
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * deviceCount: int (Required)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the best available updates for a device group and a count of how many devices need each update as
- * paginated response with {@link PagedFlux}.
+ * @return the best available updates for a device group and a count of how many
+ * devices need each update as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -670,54 +697,49 @@ public PagedFlux listBestUpdatesForGroup(String groupId, RequestOpti
/**
* Gets a list of deployments for a device group.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | orderby | String | No | Orders the set of deployments returned. You can order by start date. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | orderby | String | No | Orders the set of deployments returned. You can order by start
+ * date. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deploymentId: String (Required)
- * startDateTime: OffsetDateTime (Required)
- * update (Required): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * groupId: String (Required)
- * deviceClassSubgroups (Optional): [
- * String (Optional)
- * ]
- * isCanceled: Boolean (Optional)
- * isRetried: Boolean (Optional)
- * rollbackPolicy (Optional): {
- * update (Required): (recursive schema, see update above)
- * failure (Required): {
- * devicesFailedPercentage: int (Required)
- * devicesFailedCount: int (Required)
- * }
- * }
- * isCloudInitiatedRollback: Boolean (Optional)
+ * deploymentId: String (Required)
+ * startDateTime: OffsetDateTime (Required)
+ * update (Required): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * groupId: String (Required)
+ * deviceClassSubgroups (Optional): [
+ * String (Optional)
* ]
- * nextLink: String (Optional)
+ * isCanceled: Boolean (Optional)
+ * isRetried: Boolean (Optional)
+ * rollbackPolicy (Optional): {
+ * update (Required): (recursive schema, see update above)
+ * failure (Required): {
+ * devicesFailedPercentage: int (Required)
+ * devicesFailedCount: int (Required)
+ * }
+ * }
+ * isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -734,10 +756,10 @@ public PagedFlux listDeploymentsForGroup(String groupId, RequestOpti
/**
* Gets the deployment properties.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -764,9 +786,11 @@ public PagedFlux listDeploymentsForGroup(String groupId, RequestOpti
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -785,10 +809,10 @@ public Mono> getDeploymentWithResponse(String groupId, Stri
/**
* Creates or updates a deployment.
- *
- * Request Body Schema
- *
- *
{@code
+ * Request Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -815,12 +839,15 @@ public Mono> getDeploymentWithResponse(String groupId, Stri
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -847,9 +874,11 @@ public Mono> getDeploymentWithResponse(String groupId, Stri
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param deployment The deployment properties.
@@ -870,7 +899,7 @@ public Mono> createOrUpdateDeploymentWithResponse(String gr
/**
* Deletes a deployment.
- *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -888,12 +917,12 @@ public Mono> deleteDeploymentWithResponse(String groupId, String
}
/**
- * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* deploymentState: String(Active/ActiveWithSubgroupFailures/Failed/Inactive/Canceled) (Required)
@@ -926,8 +955,9 @@ public Mono> deleteDeploymentWithResponse(String groupId, String
* }
* ]
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -935,8 +965,9 @@ public Mono> deleteDeploymentWithResponse(String groupId, String
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed along with {@link Response} on successful completion of {@link Mono}.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -946,36 +977,33 @@ public Mono> getDeploymentStatusWithResponse(String groupId
}
/**
- * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that
- * share the same device class. All devices within the same device class are compatible with the same updates.
- *
- * Query Parameters
- *
+ * Get the device class subgroups for the group. A device class subgroup is the
+ * set of devices within the group that share the same device class. All devices
+ * within the same device class are compatible with the same updates.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of device class subgroups returned. You can filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and compatProperties/propertyName2 eq 'value2') |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of device class subgroups returned. You can
+ * filter on compat
+ * properties by name and value. (i.e. filter=compatProperties/propertyName1 eq
+ * 'value1' and compatProperties/propertyName2 eq 'value2') |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceClassId: String (Required)
- * groupId: String (Required)
- * createdDateTime: String (Required)
- * deviceCount: Integer (Optional)
- * deploymentId: String (Optional)
- * }
- * ]
- * nextLink: String (Optional)
+ * deviceClassId: String (Required)
+ * groupId: String (Required)
+ * createdDateTime: String (Required)
+ * deviceCount: Integer (Optional)
+ * deploymentId: String (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -991,12 +1019,13 @@ public PagedFlux listDeviceClassSubgroupsForGroup(String groupId, Re
}
/**
- * Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the
- * same device class. All devices within the same device class are compatible with the same updates.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets device class subgroup details. A device class subgroup is the set of
+ * devices within the group that share the same device class. All devices within
+ * the same device class are compatible with the same updates.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceClassId: String (Required)
* groupId: String (Required)
@@ -1004,8 +1033,9 @@ public PagedFlux listDeviceClassSubgroupsForGroup(String groupId, Re
* deviceCount: Integer (Optional)
* deploymentId: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1023,12 +1053,15 @@ public Mono> getDeviceClassSubgroupWithResponse(String grou
}
/**
- * Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is
- * connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned
- * up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to
- * retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this
- * subgroup after the subgroup was deleted it will be automatically re-created but there will be no history.
- *
+ * Deletes a device class subgroup. This subgroup is automatically created when a
+ * Device Update-enabled device is connected to the hub and reports its
+ * properties. Groups, subgroups, and deployments are not automatically cleaned up
+ * but are retained for history purposes. Users can call this method to delete a
+ * subgroup if they do not need to retain any of the history of the subgroup and
+ * no longer need it. If a device is ever connected again for this subgroup after
+ * the subgroup was deleted it will be automatically re-created but there will be
+ * no history.
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1046,20 +1079,22 @@ public Mono> deleteDeviceClassSubgroupWithResponse(String groupId
}
/**
- * Get device class subgroup update compliance information such as how many devices are on their latest update, how
- * many need new updates, and how many are in progress on receiving a new update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* totalDeviceCount: int (Required)
* onLatestUpdateDeviceCount: int (Required)
* newUpdatesAvailableDeviceCount: int (Required)
* updatesInProgressDeviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1067,9 +1102,9 @@ public Mono> deleteDeviceClassSubgroupWithResponse(String groupId
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return device class subgroup update compliance information such as how many devices are on their latest update,
- * how many need new updates, and how many are in progress on receiving a new update along with {@link Response}
- * on successful completion of {@link Mono}.
+ * @return device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1080,11 +1115,12 @@ public Mono> getDeviceClassSubgroupUpdateComplianceWithResp
}
/**
- * Get the best available update for a device class subgroup and a count of how many devices need this update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get the best available update for a device class subgroup and a count of how
+ * many devices need this update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* deviceClassId: String (Required)
@@ -1099,8 +1135,9 @@ public Mono> getDeviceClassSubgroupUpdateComplianceWithResp
* }
* deviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1108,8 +1145,8 @@ public Mono> getDeviceClassSubgroupUpdateComplianceWithResp
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the best available update for a device class subgroup and a count of how many devices need this update
- * along with {@link Response} on successful completion of {@link Mono}.
+ * @return the best available update for a device class subgroup and a count of how
+ * many devices need this update along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1121,54 +1158,49 @@ public Mono> getBestUpdatesForDeviceClassSubgroupWithRespon
/**
* Gets a list of deployments for a device class subgroup.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | orderby | String | No | Orders the set of deployments returned. You can order by start date. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | orderby | String | No | Orders the set of deployments returned. You can order by start
+ * date. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deploymentId: String (Required)
- * startDateTime: OffsetDateTime (Required)
- * update (Required): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * groupId: String (Required)
- * deviceClassSubgroups (Optional): [
- * String (Optional)
- * ]
- * isCanceled: Boolean (Optional)
- * isRetried: Boolean (Optional)
- * rollbackPolicy (Optional): {
- * update (Required): (recursive schema, see update above)
- * failure (Required): {
- * devicesFailedPercentage: int (Required)
- * devicesFailedCount: int (Required)
- * }
- * }
- * isCloudInitiatedRollback: Boolean (Optional)
+ * deploymentId: String (Required)
+ * startDateTime: OffsetDateTime (Required)
+ * update (Required): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * groupId: String (Required)
+ * deviceClassSubgroups (Optional): [
+ * String (Optional)
* ]
- * nextLink: String (Optional)
+ * isCanceled: Boolean (Optional)
+ * isRetried: Boolean (Optional)
+ * rollbackPolicy (Optional): {
+ * update (Required): (recursive schema, see update above)
+ * failure (Required): {
+ * devicesFailedPercentage: int (Required)
+ * devicesFailedCount: int (Required)
+ * }
+ * }
+ * isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1187,10 +1219,10 @@ public PagedFlux listDeploymentsForDeviceClassSubgroup(String groupI
/**
* Gets the deployment properties.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1217,9 +1249,11 @@ public PagedFlux listDeploymentsForDeviceClassSubgroup(String groupI
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1240,7 +1274,7 @@ public Mono> getDeploymentForDeviceClassSubgroupWithRespons
/**
* Deletes a device class subgroup deployment.
- *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1261,10 +1295,10 @@ public Mono> deleteDeploymentForDeviceClassSubgroupWithResponse(S
/**
* Stops a deployment.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1291,9 +1325,11 @@ public Mono> deleteDeploymentForDeviceClassSubgroupWithResponse(S
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1313,10 +1349,10 @@ public Mono> stopDeploymentWithResponse(String groupId, Str
/**
* Retries a deployment with failed devices.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1343,9 +1379,11 @@ public Mono> stopDeploymentWithResponse(String groupId, Str
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1365,12 +1403,12 @@ public Mono> retryDeploymentWithResponse(String groupId, St
}
/**
- * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* deviceClassId: String (Required)
@@ -1396,8 +1434,9 @@ public Mono> retryDeploymentWithResponse(String groupId, St
* devicesCompletedSucceededCount: Integer (Optional)
* devicesCanceledCount: Integer (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1406,8 +1445,9 @@ public Mono> retryDeploymentWithResponse(String groupId, St
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed along with {@link Response} on successful completion of {@link Mono}.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1418,35 +1458,31 @@ public Mono> getDeviceClassSubgroupDeploymentStatusWithResp
}
/**
- * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices.
- *
- * Query Parameters
- *
+ * Gets a list of devices in a deployment along with their state. Useful for
+ * getting a list of failed devices.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of deployment device states returned. You can
+ * filter on
+ * deviceId and moduleId and/or deviceState. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * retryCount: int (Required)
- * movedOnToNewDeployment: boolean (Required)
- * deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
- * }
- * ]
- * nextLink: String (Optional)
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
+ * retryCount: int (Required)
+ * movedOnToNewDeployment: boolean (Required)
+ * deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1467,20 +1503,19 @@ public PagedFlux listDeviceStatesForDeviceClassSubgroupDeployment(St
/**
* Retrieve operation status.
- *
- * Header Parameters
- *
+ *
Header Parameters
*
- * Header Parameters
- * | Name | Type | Required | Description |
- * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will
+ * be performed only if
+ * the ETag on the server does not match this value. |
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Required)
* status: String(NotStarted/Running/Succeeded/Failed) (Required)
@@ -1504,8 +1539,9 @@ public PagedFlux listDeviceStatesForDeviceClassSubgroupDeployment(St
* createdDateTime: OffsetDateTime (Required)
* etag: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param operationId Operation identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1522,52 +1558,51 @@ public Mono> getOperationStatusWithResponse(String operatio
}
/**
- * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted.
- *
- * Query Parameters
- *
+ * Get a list of all device import operations. Completed operations are kept for 7
+ * days before auto-deleted.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
- * | top | Integer | No | Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of operations returned. Only one specific
+ * filter is
+ * supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * | top | Integer | No | Specifies a non-negative integer n that limits the number of items
+ * returned
+ * from a collection. The service returns the number of available items up to but
+ * not greater than the specified value n. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * operationId: String (Required)
- * status: String(NotStarted/Running/Succeeded/Failed) (Required)
- * error (Optional): {
- * code: String (Required)
- * message: String (Required)
- * target: String (Optional)
- * details (Optional): [
- * (recursive schema, see above)
- * ]
- * innererror (Optional): {
- * code: String (Required)
- * message: String (Optional)
- * errorDetail: String (Optional)
- * innerError (Optional): (recursive schema, see innerError above)
- * }
- * occurredDateTime: OffsetDateTime (Optional)
- * }
- * traceId: String (Optional)
- * lastActionDateTime: OffsetDateTime (Required)
- * createdDateTime: OffsetDateTime (Required)
- * etag: String (Optional)
+ * operationId: String (Required)
+ * status: String(NotStarted/Running/Succeeded/Failed) (Required)
+ * error (Optional): {
+ * code: String (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String (Required)
+ * message: String (Optional)
+ * errorDetail: String (Optional)
+ * innerError (Optional): (recursive schema, see innerError above)
* }
- * ]
- * nextLink: String (Optional)
+ * occurredDateTime: OffsetDateTime (Optional)
+ * }
+ * traceId: String (Optional)
+ * lastActionDateTime: OffsetDateTime (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * etag: String (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1583,10 +1618,10 @@ public PagedFlux listOperationStatuses(RequestOptions requestOptions
/**
* Start the device diagnostics log collection on specified devices.
- *
- * Request Body Schema
- *
- *
{@code
+ * Request Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* deviceList (Required): [
@@ -1600,11 +1635,13 @@ public PagedFlux listOperationStatuses(RequestOptions requestOptions
* lastActionDateTime: String (Optional)
* status: String(NotStarted/Running/Succeeded/Failed) (Optional)
* }
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* deviceList (Required): [
@@ -1618,8 +1655,9 @@ public PagedFlux listOperationStatuses(RequestOptions requestOptions
* lastActionDateTime: String (Optional)
* status: String(NotStarted/Running/Succeeded/Failed) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param logCollectionId Log collection identifier.
* @param logCollection The log collection properties.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1638,10 +1676,10 @@ public Mono> startLogCollectionWithResponse(String logColle
/**
* Get the device diagnostics log collection.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* deviceList (Required): [
@@ -1655,16 +1693,17 @@ public Mono> startLogCollectionWithResponse(String logColle
* lastActionDateTime: String (Optional)
* status: String(NotStarted/Running/Succeeded/Failed) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param logCollectionId Log collection identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the device diagnostics log collection along with {@link Response} on successful completion of {@link
- * Mono}.
+ * @return the device diagnostics log collection along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1675,30 +1714,26 @@ public Mono> getLogCollectionWithResponse(String logCollect
/**
* Get all device diagnostics log collections.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
+ * operationId: String (Optional)
+ * deviceList (Required): [
* (Required){
- * operationId: String (Optional)
- * deviceList (Required): [
- * (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * }
- * ]
- * description: String (Optional)
- * createdDateTime: String (Optional)
- * lastActionDateTime: String (Optional)
- * status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
* }
* ]
- * nextLink: String (Optional)
+ * description: String (Optional)
+ * createdDateTime: String (Optional)
+ * lastActionDateTime: String (Optional)
+ * status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1714,10 +1749,10 @@ public PagedFlux listLogCollections(RequestOptions requestOptions) {
/**
* Get log collection with detailed status.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* createdDateTime: String (Optional)
@@ -1735,8 +1770,9 @@ public PagedFlux listLogCollections(RequestOptions requestOptions) {
* ]
* description: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param logCollectionId Log collection identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1754,31 +1790,27 @@ public Mono> getLogCollectionDetailedStatusWithResponse(Str
/**
* Get list of device health.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
+ * state: String(healthy/unhealthy) (Required)
+ * digitalTwinModelId: String (Optional)
+ * healthChecks (Required): [
* (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * state: String(healthy/unhealthy) (Required)
- * digitalTwinModelId: String (Optional)
- * healthChecks (Required): [
- * (Required){
- * name: String (Optional)
- * result: String(success/userError) (Optional)
- * }
- * ]
+ * name: String (Optional)
+ * result: String(success/userError) (Optional)
* }
* ]
- * nextLink: String (Optional)
* }
- * }
- *
- * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device
- * id and module id.
+ * }
+ *
+ *
+ * @param filter Restricts the set of devices for which device health is returned. You can
+ * filter on status, device id and module id.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1791,4 +1823,1388 @@ public Mono> getLogCollectionDetailedStatusWithResponse(Str
public PagedFlux listHealthOfDevices(String filter, RequestOptions requestOptions) {
return this.serviceClient.listHealthOfDevicesAsync(filter, requestOptions);
}
+
+ /**
+ * Gets a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub.
+ *
+ * @param filter Restricts the set of device classes returned. You can filter on friendly name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeviceClasses(String filter) {
+ // Generated convenience method for listDeviceClasses
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ PagedFlux pagedFluxResponse = listDeviceClasses(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClass.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeviceClasses() {
+ // Generated convenience method for listDeviceClasses
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listDeviceClasses(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClass.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the properties of a device class.
+ *
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of a device class on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeviceClass(String deviceClassId) {
+ // Generated convenience method for getDeviceClassWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassWithResponse(deviceClassId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClass.class));
+ }
+
+ /**
+ * Update device class details.
+ *
+ * @param deviceClassId Device class identifier.
+ * @param deviceClassPatch The device class json merge patch body. Currently only supports patching
+ * friendlyName.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device class metadata on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateDeviceClass(String deviceClassId, PatchBody deviceClassPatch) {
+ // Generated convenience method for updateDeviceClassWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getPatchBodyAccessor().prepareModelForJsonMergePatch(deviceClassPatch, true);
+ BinaryData deviceClassPatchInBinaryData = BinaryData.fromObject(deviceClassPatch);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ deviceClassPatchInBinaryData.getLength();
+ JsonMergePatchHelper.getPatchBodyAccessor().prepareModelForJsonMergePatch(deviceClassPatch, false);
+ return updateDeviceClassWithResponse(deviceClassId, deviceClassPatchInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClass.class));
+ }
+
+ /**
+ * Deletes a device class. Device classes are created automatically when Device
+ * Update-enabled devices are connected to the hub but are not automatically
+ * cleaned up since they are referenced by DeviceClassSubgroups. If the user has
+ * deleted all DeviceClassSubgroups for a device class they can also delete the
+ * device class to remove the records from the system and to stop checking the
+ * compatibility of this device class with new updates. If a device is ever
+ * reconnected for this device class it will be re-created.
+ *
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteDeviceClass(String deviceClassId) {
+ // Generated convenience method for deleteDeviceClassWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteDeviceClassWithResponse(deviceClassId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Gets a list of installable updates for a device class.
+ *
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of installable updates for a device class as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listInstallableUpdatesForDeviceClass(String deviceClassId) {
+ // Generated convenience method for listInstallableUpdatesForDeviceClass
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listInstallableUpdatesForDeviceClass(deviceClassId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(UpdateInfo.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of devices connected to Device Update for IoT Hub.
+ *
+ * @param filter Restricts the set of devices returned. You can filter on GroupId,
+ * DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to
+ * query for devices with no deployment status (that have never been deployed to).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices connected to Device Update for IoT Hub as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDevices(String filter) {
+ // Generated convenience method for listDevices
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ PagedFlux pagedFluxResponse = listDevices(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Device.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of devices connected to Device Update for IoT Hub.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices connected to Device Update for IoT Hub as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDevices() {
+ // Generated convenience method for listDevices
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listDevices(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Device.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Import existing devices from IoT Hub. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
+ *
+ * @param importType The types of devices to import.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux beginImportDevices(ImportType importType) {
+ // Generated convenience method for beginImportDevicesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginImportDevicesWithModelAsync(
+ BinaryData.fromObject(importType == null ? null : importType.toString()), requestOptions);
+ }
+
+ /**
+ * Gets the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub.
+ *
+ * @param deviceId Device identifier in Azure IoT Hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDevice(String deviceId) {
+ // Generated convenience method for getDeviceWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceWithResponse(deviceId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Device.class));
+ }
+
+ /**
+ * Gets the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub.
+ *
+ * @param deviceId Device identifier in Azure IoT Hub.
+ * @param moduleId Device module identifier in Azure IoT Hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeviceModule(String deviceId, String moduleId) {
+ // Generated convenience method for getDeviceModuleWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceModuleWithResponse(deviceId, moduleId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Device.class));
+ }
+
+ /**
+ * Gets the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUpdateCompliance() {
+ // Generated convenience method for getUpdateComplianceWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUpdateComplianceWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UpdateCompliance.class));
+ }
+
+ /**
+ * Gets a list of all device groups. The $default group will always be returned
+ * first.
+ *
+ * @param orderBy Orders the set of groups returned. You can order by groupId, deviceCount,
+ * createdDate, subgroupsWithNewUpdatesAvailableCount,
+ * subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device groups as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listGroups(String orderBy) {
+ // Generated convenience method for listGroups
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ PagedFlux pagedFluxResponse = listGroups(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Group.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of all device groups. The $default group will always be returned
+ * first.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device groups as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listGroups() {
+ // Generated convenience method for listGroups
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listGroups(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Group.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the device group properties.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device group properties on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getGroup(String groupId) {
+ // Generated convenience method for getGroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getGroupWithResponse(groupId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Group.class));
+ }
+
+ /**
+ * Deletes a device group. This group is automatically created when a Device
+ * Update-enabled device is connected to the hub and reports its properties.
+ * Groups, subgroups, and deployments are not automatically cleaned up but are
+ * retained for history purposes. Users can call this method to delete a group if
+ * they do not need to retain any of the history of the group and no longer need
+ * it. If a device is ever connected again for this group after the group was
+ * deleted it will be automatically re-created but there will be no history.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteGroup(String groupId) {
+ // Generated convenience method for deleteGroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteGroupWithResponse(groupId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Get device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUpdateComplianceForGroup(String groupId) {
+ // Generated convenience method for getUpdateComplianceForGroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUpdateComplianceForGroupWithResponse(groupId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UpdateCompliance.class));
+ }
+
+ /**
+ * Get the best available updates for a device group and a count of how many
+ * devices need each update.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the best available updates for a device group and a count of how many
+ * devices need each update as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listBestUpdatesForGroup(String groupId) {
+ // Generated convenience method for listBestUpdatesForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listBestUpdatesForGroup(groupId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(
+ pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClassSubgroupUpdatableDevices.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of deployments for a device group.
+ *
+ * @param groupId Group identifier.
+ * @param orderBy Orders the set of deployments returned. You can order by start date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device group as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentsForGroup(String groupId, String orderBy) {
+ // Generated convenience method for listDeploymentsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ PagedFlux pagedFluxResponse = listDeploymentsForGroup(groupId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of deployments for a device group.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device group as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentsForGroup(String groupId) {
+ // Generated convenience method for listDeploymentsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listDeploymentsForGroup(groupId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the deployment properties.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the deployment properties on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeployment(String groupId, String deploymentId) {
+ // Generated convenience method for getDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentWithResponse(groupId, deploymentId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class));
+ }
+
+ /**
+ * Creates or updates a deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @param deployment The deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return deployment metadata on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateDeployment(String groupId, String deploymentId, Deployment deployment) {
+ // Generated convenience method for createOrUpdateDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createOrUpdateDeploymentWithResponse(groupId, deploymentId, BinaryData.fromObject(deployment),
+ requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class));
+ }
+
+ /**
+ * Deletes a deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteDeployment(String groupId, String deploymentId) {
+ // Generated convenience method for deleteDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteDeploymentWithResponse(groupId, deploymentId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeploymentStatus(String groupId, String deploymentId) {
+ // Generated convenience method for getDeploymentStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentStatusWithResponse(groupId, deploymentId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeploymentStatus.class));
+ }
+
+ /**
+ * Get the device class subgroups for the group. A device class subgroup is the
+ * set of devices within the group that share the same device class. All devices
+ * within the same device class are compatible with the same updates.
+ *
+ * @param groupId Group identifier.
+ * @param filter Restricts the set of device class subgroups returned. You can filter on compat
+ * properties by name and value. (i.e. filter=compatProperties/propertyName1 eq
+ * 'value1' and compatProperties/propertyName2 eq 'value2').
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device class subgroups for the group as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeviceClassSubgroupsForGroup(String groupId, String filter) {
+ // Generated convenience method for listDeviceClassSubgroupsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ PagedFlux pagedFluxResponse = listDeviceClassSubgroupsForGroup(groupId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClassSubgroup.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Get the device class subgroups for the group. A device class subgroup is the
+ * set of devices within the group that share the same device class. All devices
+ * within the same device class are compatible with the same updates.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device class subgroups for the group as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeviceClassSubgroupsForGroup(String groupId) {
+ // Generated convenience method for listDeviceClassSubgroupsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listDeviceClassSubgroupsForGroup(groupId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClassSubgroup.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets device class subgroup details. A device class subgroup is the set of
+ * devices within the group that share the same device class. All devices within
+ * the same device class are compatible with the same updates.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device class subgroup details on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeviceClassSubgroup(String groupId, String deviceClassId) {
+ // Generated convenience method for getDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClassSubgroup.class));
+ }
+
+ /**
+ * Deletes a device class subgroup. This subgroup is automatically created when a
+ * Device Update-enabled device is connected to the hub and reports its
+ * properties. Groups, subgroups, and deployments are not automatically cleaned up
+ * but are retained for history purposes. Users can call this method to delete a
+ * subgroup if they do not need to retain any of the history of the subgroup and
+ * no longer need it. If a device is ever connected again for this subgroup after
+ * the subgroup was deleted it will be automatically re-created but there will be
+ * no history.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteDeviceClassSubgroup(String groupId, String deviceClassId) {
+ // Generated convenience method for deleteDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Get device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeviceClassSubgroupUpdateCompliance(String groupId, String deviceClassId) {
+ // Generated convenience method for getDeviceClassSubgroupUpdateComplianceWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassSubgroupUpdateComplianceWithResponse(groupId, deviceClassId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UpdateCompliance.class));
+ }
+
+ /**
+ * Get the best available update for a device class subgroup and a count of how
+ * many devices need this update.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the best available update for a device class subgroup and a count of how
+ * many devices need this update on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getBestUpdatesForDeviceClassSubgroup(String groupId,
+ String deviceClassId) {
+ // Generated convenience method for getBestUpdatesForDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getBestUpdatesForDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClassSubgroupUpdatableDevices.class));
+ }
+
+ /**
+ * Gets a list of deployments for a device class subgroup.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param orderBy Orders the set of deployments returned. You can order by start date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device class subgroup as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId,
+ String orderBy) {
+ // Generated convenience method for listDeploymentsForDeviceClassSubgroup
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ PagedFlux pagedFluxResponse
+ = listDeploymentsForDeviceClassSubgroup(groupId, deviceClassId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of deployments for a device class subgroup.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device class subgroup as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId) {
+ // Generated convenience method for listDeploymentsForDeviceClassSubgroup
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse
+ = listDeploymentsForDeviceClassSubgroup(groupId, deviceClassId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets the deployment properties.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the deployment properties on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeploymentForDeviceClassSubgroup(String groupId, String deviceClassId,
+ String deploymentId) {
+ // Generated convenience method for getDeploymentForDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class));
+ }
+
+ /**
+ * Deletes a device class subgroup deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteDeploymentForDeviceClassSubgroup(String groupId, String deviceClassId,
+ String deploymentId) {
+ // Generated convenience method for deleteDeploymentForDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Stops a deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return deployment metadata on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopDeployment(String groupId, String deviceClassId, String deploymentId) {
+ // Generated convenience method for stopDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return stopDeploymentWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class));
+ }
+
+ /**
+ * Retries a deployment with failed devices.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return deployment metadata on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono retryDeployment(String groupId, String deviceClassId, String deploymentId) {
+ // Generated convenience method for retryDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return retryDeploymentWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Deployment.class));
+ }
+
+ /**
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getDeviceClassSubgroupDeploymentStatus(String groupId,
+ String deviceClassId, String deploymentId) {
+ // Generated convenience method for getDeviceClassSubgroupDeploymentStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassSubgroupDeploymentStatusWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceClassSubgroupDeploymentStatus.class));
+ }
+
+ /**
+ * Gets a list of devices in a deployment along with their state. Useful for
+ * getting a list of failed devices.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @param filter Restricts the set of deployment device states returned. You can filter on
+ * deviceId and moduleId and/or deviceState.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices in a deployment along with their state as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeviceStatesForDeviceClassSubgroupDeployment(String groupId,
+ String deviceClassId, String deploymentId, String filter) {
+ // Generated convenience method for listDeviceStatesForDeviceClassSubgroupDeployment
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ PagedFlux pagedFluxResponse
+ = listDeviceStatesForDeviceClassSubgroupDeployment(groupId, deviceClassId, deploymentId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeploymentDeviceState.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of devices in a deployment along with their state. Useful for
+ * getting a list of failed devices.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices in a deployment along with their state as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listDeviceStatesForDeviceClassSubgroupDeployment(String groupId,
+ String deviceClassId, String deploymentId) {
+ // Generated convenience method for listDeviceStatesForDeviceClassSubgroupDeployment
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse
+ = listDeviceStatesForDeviceClassSubgroupDeployment(groupId, deviceClassId, deploymentId, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeploymentDeviceState.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Retrieve operation status.
+ *
+ * @param operationId Operation identifier.
+ * @param ifNoneMatch Defines the If-None-Match condition. The operation will be performed only if
+ * the ETag on the server does not match this value.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation metadata on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getOperationStatus(String operationId, String ifNoneMatch) {
+ // Generated convenience method for getOperationStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (ifNoneMatch != null) {
+ requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch);
+ }
+ return getOperationStatusWithResponse(operationId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceOperation.class));
+ }
+
+ /**
+ * Retrieve operation status.
+ *
+ * @param operationId Operation identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation metadata on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getOperationStatus(String operationId) {
+ // Generated convenience method for getOperationStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getOperationStatusWithResponse(operationId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceOperation.class));
+ }
+
+ /**
+ * Get a list of all device import operations. Completed operations are kept for 7
+ * days before auto-deleted.
+ *
+ * @param filter Restricts the set of operations returned. Only one specific filter is
+ * supported: "status eq 'NotStarted' or status eq 'Running'".
+ * @param top Specifies a non-negative integer n that limits the number of items returned
+ * from a collection. The service returns the number of available items up to but
+ * not greater than the specified value n.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device import operations as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listOperationStatuses(String filter, Integer top) {
+ // Generated convenience method for listOperationStatuses
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ PagedFlux pagedFluxResponse = listOperationStatuses(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceOperation.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Get a list of all device import operations. Completed operations are kept for 7
+ * days before auto-deleted.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device import operations as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listOperationStatuses() {
+ // Generated convenience method for listOperationStatuses
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listOperationStatuses(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceOperation.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Start the device diagnostics log collection on specified devices.
+ *
+ * @param logCollectionId Log collection identifier.
+ * @param logCollection The log collection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return diagnostics request body on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono startLogCollection(String logCollectionId, LogCollection logCollection) {
+ // Generated convenience method for startLogCollectionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return startLogCollectionWithResponse(logCollectionId, BinaryData.fromObject(logCollection), requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LogCollection.class));
+ }
+
+ /**
+ * Get the device diagnostics log collection.
+ *
+ * @param logCollectionId Log collection identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device diagnostics log collection on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getLogCollection(String logCollectionId) {
+ // Generated convenience method for getLogCollectionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLogCollectionWithResponse(logCollectionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LogCollection.class));
+ }
+
+ /**
+ * Get all device diagnostics log collections.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all device diagnostics log collections as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listLogCollections() {
+ // Generated convenience method for listLogCollections
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listLogCollections(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(LogCollection.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Get log collection with detailed status.
+ *
+ * @param logCollectionId Log collection identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log collection with detailed status on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getLogCollectionDetailedStatus(String logCollectionId) {
+ // Generated convenience method for getLogCollectionDetailedStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLogCollectionDetailedStatusWithResponse(logCollectionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LogCollectionOperationDetailedStatus.class));
+ }
+
+ /**
+ * Get list of device health.
+ *
+ * @param filter Restricts the set of devices for which device health is returned. You can
+ * filter on status, device id and module id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of device health as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listHealthOfDevices(String filter) {
+ // Generated convenience method for listHealthOfDevices
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listHealthOfDevices(filter, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(DeviceHealth.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
}
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java
index 39f48d7d53ad..4772a896da59 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.iot.deviceupdate;
@@ -12,84 +12,101 @@
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.polling.SyncPoller;
-import com.azure.iot.deviceupdate.implementation.DeviceManagementsImpl;
+import com.azure.iot.deviceupdate.implementation.DeviceManagementClientImpl;
+import com.azure.iot.deviceupdate.implementation.JsonMergePatchHelper;
+import com.azure.iot.deviceupdate.models.Deployment;
+import com.azure.iot.deviceupdate.models.DeploymentDeviceState;
+import com.azure.iot.deviceupdate.models.DeploymentStatus;
+import com.azure.iot.deviceupdate.models.Device;
+import com.azure.iot.deviceupdate.models.DeviceClass;
+import com.azure.iot.deviceupdate.models.DeviceClassSubgroup;
+import com.azure.iot.deviceupdate.models.DeviceClassSubgroupDeploymentStatus;
+import com.azure.iot.deviceupdate.models.DeviceClassSubgroupUpdatableDevices;
+import com.azure.iot.deviceupdate.models.DeviceHealth;
+import com.azure.iot.deviceupdate.models.DeviceOperation;
+import com.azure.iot.deviceupdate.models.Group;
+import com.azure.iot.deviceupdate.models.ImportType;
+import com.azure.iot.deviceupdate.models.LogCollection;
+import com.azure.iot.deviceupdate.models.LogCollectionOperationDetailedStatus;
+import com.azure.iot.deviceupdate.models.PatchBody;
+import com.azure.iot.deviceupdate.models.UpdateCompliance;
+import com.azure.iot.deviceupdate.models.UpdateInfo;
-/** Initializes a new instance of the synchronous DeviceUpdateClient type. */
+/**
+ * Initializes a new instance of the synchronous DeviceManagementClient type.
+ */
@ServiceClient(builder = DeviceManagementClientBuilder.class)
public final class DeviceManagementClient {
@Generated
- private final DeviceManagementsImpl serviceClient;
+ private final DeviceManagementClientImpl serviceClient;
/**
* Initializes an instance of DeviceManagementClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
- DeviceManagementClient(DeviceManagementsImpl serviceClient) {
+ DeviceManagementClient(DeviceManagementClientImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
- * Gets a list of all device classes (sets of devices compatible with the same updates based on the model Id and
- * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device
- * Update for IoT Hub.
- *
- * Query Parameters
- *
+ * Gets a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of device classes returned. You can filter on friendly name. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of device classes returned. You can filter on
+ * friendly name. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceClassId: String (Required)
- * friendlyName: String (Optional)
- * deviceClassProperties (Required): {
- * contractModel (Optional): {
- * id: String (Required)
- * name: String (Required)
- * }
- * compatProperties (Required): {
- * String: String (Required)
- * }
- * }
- * bestCompatibleUpdate (Optional): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
+ * deviceClassId: String (Required)
+ * friendlyName: String (Optional)
+ * deviceClassProperties (Required): {
+ * contractModel (Optional): {
+ * id: String (Required)
+ * name: String (Required)
* }
- * ]
- * nextLink: String (Optional)
+ * compatProperties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * bestCompatibleUpdate (Optional): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
* }
- * }
- *
+ * }
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of all device classes (sets of devices compatible with the same updates based on the model Id and
- * compat properties reported in the Device Update PnP interface in IoT Hub) for all devices connected to Device
- * Update for IoT Hub as paginated response with {@link PagedIterable}.
+ * @return a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -99,10 +116,10 @@ public PagedIterable listDeviceClasses(RequestOptions requestOptions
/**
* Gets the properties of a device class.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceClassId: String (Required)
* friendlyName: String (Optional)
@@ -125,8 +142,9 @@ public PagedIterable listDeviceClasses(RequestOptions requestOptions
* friendlyName: String (Optional)
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -143,18 +161,20 @@ public Response getDeviceClassWithResponse(String deviceClassId, Req
/**
* Update device class details.
- *
- * Request Body Schema
- *
- *
{@code
+ * Request Body Schema
+ *
+ *
+ * {@code
* {
- * friendlyName: String (Required)
+ * friendlyName: String (Optional, Required on create)
* }
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceClassId: String (Required)
* friendlyName: String (Optional)
@@ -177,10 +197,12 @@ public Response getDeviceClassWithResponse(String deviceClassId, Req
* friendlyName: String (Optional)
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceClassId Device class identifier.
- * @param deviceClassPatch The device class json merge patch body. Currently only supports patching friendlyName.
+ * @param deviceClassPatch The device class json merge patch body. Currently only supports patching
+ * friendlyName.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -196,12 +218,14 @@ public Response updateDeviceClassWithResponse(String deviceClassId,
}
/**
- * Deletes a device class. Device classes are created automatically when Device Update-enabled devices are connected
- * to the hub but are not automatically cleaned up since they are referenced by DeviceClassSubgroups. If the user
- * has deleted all DeviceClassSubgroups for a device class they can also delete the device class to remove the
- * records from the system and to stop checking the compatibility of this device class with new updates. If a device
- * is ever reconnected for this device class it will be re-created.
- *
+ * Deletes a device class. Device classes are created automatically when Device
+ * Update-enabled devices are connected to the hub but are not automatically
+ * cleaned up since they are referenced by DeviceClassSubgroups. If the user has
+ * deleted all DeviceClassSubgroups for a device class they can also delete the
+ * device class to remove the records from the system and to stop checking the
+ * compatibility of this device class with new updates. If a device is ever
+ * reconnected for this device class it will be re-created.
+ *
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -218,26 +242,22 @@ public Response deleteDeviceClassWithResponse(String deviceClassId, Reques
/**
* Gets a list of installable updates for a device class.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * ]
- * nextLink: String (Optional)
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -255,67 +275,63 @@ public PagedIterable listInstallableUpdatesForDeviceClass(String dev
/**
* Gets a list of devices connected to Device Update for IoT Hub.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of devices returned. You can filter on GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with no deployment status (that have never been deployed to). |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of devices returned. You can filter on
+ * GroupId,
+ * DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to
+ * query for devices with no deployment status (that have never been deployed to). |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * deviceClassId: String (Required)
- * groupId: String (Optional)
- * lastAttemptedUpdate (Optional): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
+ * deviceClassId: String (Required)
+ * groupId: String (Optional)
+ * lastAttemptedUpdate (Optional): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
+ * installedUpdate (Optional): (recursive schema, see installedUpdate above)
+ * onLatestUpdate: boolean (Required)
+ * lastDeploymentId: String (Optional)
+ * lastInstallResult (Optional): {
+ * resultCode: int (Required)
+ * extendedResultCode: int (Required)
+ * resultDetails: String (Optional)
+ * stepResults (Optional): [
+ * (Optional){
+ * update (Optional): (recursive schema, see update above)
* description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * deploymentStatus: String(Succeeded/InProgress/Canceled/Failed) (Optional)
- * installedUpdate (Optional): (recursive schema, see installedUpdate above)
- * onLatestUpdate: boolean (Required)
- * lastDeploymentId: String (Optional)
- * lastInstallResult (Optional): {
* resultCode: int (Required)
* extendedResultCode: int (Required)
* resultDetails: String (Optional)
- * stepResults (Optional): [
- * (Optional){
- * update (Optional): (recursive schema, see update above)
- * description: String (Optional)
- * resultCode: int (Required)
- * extendedResultCode: int (Required)
- * resultDetails: String (Optional)
- * }
- * ]
* }
- * }
- * ]
- * nextLink: String (Optional)
+ * ]
+ * }
+ * }
* }
- * }
- *
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of devices connected to Device Update for IoT Hub as paginated response with {@link
- * PagedIterable}.
+ * @return a list of devices connected to Device Update for IoT Hub as paginated response with
+ * {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -324,15 +340,16 @@ public PagedIterable listDevices(RequestOptions requestOptions) {
}
/**
- * Import existing devices from IoT Hub. This is a long-running-operation; use Operation-Location response header
- * value to check for operation status.
- *
- * Request Body Schema
- *
- *
{@code
+ * Import existing devices from IoT Hub. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
+ * Request Body Schema
+ *
+ *
+ * {@code
* String(Devices/Modules/All)
- * }
- *
+ * }
+ *
+ *
* @param importType The types of devices to import.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -348,11 +365,12 @@ public SyncPoller beginImportDevices(BinaryData importTy
}
/**
- * Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceId: String (Required)
* moduleId: String (Optional)
@@ -386,16 +404,17 @@ public SyncPoller beginImportDevices(BinaryData importTy
* ]
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceId Device identifier in Azure IoT Hub.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the device properties and latest deployment status for a device connected to Device Update for IoT Hub
- * along with {@link Response}.
+ * @return the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -404,12 +423,12 @@ public Response getDeviceWithResponse(String deviceId, RequestOption
}
/**
- * Gets the device module properties and latest deployment status for a device module connected to Device Update for
- * IoT Hub.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceId: String (Required)
* moduleId: String (Optional)
@@ -443,8 +462,9 @@ public Response getDeviceWithResponse(String deviceId, RequestOption
* ]
* }
* }
- * }
- *
+ * }
+ *
+ *
* @param deviceId Device identifier in Azure IoT Hub.
* @param moduleId Device module identifier in Azure IoT Hub.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -452,8 +472,8 @@ public Response getDeviceWithResponse(String deviceId, RequestOption
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the device module properties and latest deployment status for a device module connected to Device Update
- * for IoT Hub along with {@link Response}.
+ * @return the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -463,27 +483,28 @@ public Response getDeviceModuleWithResponse(String deviceId, String
}
/**
- * Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress
- * receiving new updates.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* totalDeviceCount: int (Required)
* onLatestUpdateDeviceCount: int (Required)
* newUpdatesAvailableDeviceCount: int (Required)
* updatesInProgressDeviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the breakdown of how many devices are on their latest update, have new updates available, or are in
- * progress receiving new updates along with {@link Response}.
+ * @return the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -492,40 +513,37 @@ public Response getUpdateComplianceWithResponse(RequestOptions reque
}
/**
- * Gets a list of all device groups. The $default group will always be returned first.
- *
- * Query Parameters
- *
+ * Gets a list of all device groups. The $default group will always be returned
+ * first.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | orderby | String | No | Orders the set of groups returned. You can order by groupId, deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | orderby | String | No | Orders the set of groups returned. You can order by groupId,
+ * deviceCount,
+ * createdDate, subgroupsWithNewUpdatesAvailableCount,
+ * subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * groupId: String (Required)
- * groupType: String(IoTHubTag/DefaultNoTag) (Required)
- * createdDateTime: String (Required)
- * deviceCount: Integer (Optional)
- * subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
- * subgroupsWithUpdatesInProgressCount: Integer (Optional)
- * subgroupsWithOnLatestUpdateCount: Integer (Optional)
- * deployments (Optional): [
- * String (Optional)
- * ]
- * }
+ * groupId: String (Required)
+ * groupType: String(IoTHubTag/DefaultNoTag) (Required)
+ * createdDateTime: String (Required)
+ * deviceCount: Integer (Optional)
+ * subgroupsWithNewUpdatesAvailableCount: Integer (Optional)
+ * subgroupsWithUpdatesInProgressCount: Integer (Optional)
+ * subgroupsWithOnLatestUpdateCount: Integer (Optional)
+ * deployments (Optional): [
+ * String (Optional)
* ]
- * nextLink: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -541,10 +559,10 @@ public PagedIterable listGroups(RequestOptions requestOptions) {
/**
* Gets the device group properties.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* groupType: String(IoTHubTag/DefaultNoTag) (Required)
@@ -557,8 +575,9 @@ public PagedIterable listGroups(RequestOptions requestOptions) {
* String (Optional)
* ]
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -574,12 +593,14 @@ public Response getGroupWithResponse(String groupId, RequestOptions
}
/**
- * Deletes a device group. This group is automatically created when a Device Update-enabled device is connected to
- * the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned up but are
- * retained for history purposes. Users can call this method to delete a group if they do not need to retain any of
- * the history of the group and no longer need it. If a device is ever connected again for this group after the
- * group was deleted it will be automatically re-created but there will be no history.
- *
+ * Deletes a device group. This group is automatically created when a Device
+ * Update-enabled device is connected to the hub and reports its properties.
+ * Groups, subgroups, and deployments are not automatically cleaned up but are
+ * retained for history purposes. Users can call this method to delete a group if
+ * they do not need to retain any of the history of the group and no longer need
+ * it. If a device is ever connected again for this group after the group was
+ * deleted it will be automatically re-created but there will be no history.
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -595,28 +616,31 @@ public Response deleteGroupWithResponse(String groupId, RequestOptions req
}
/**
- * Get device group update compliance information such as how many devices are on their latest update, how many need
- * new updates, and how many are in progress on receiving a new update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* totalDeviceCount: int (Required)
* onLatestUpdateDeviceCount: int (Required)
* newUpdatesAvailableDeviceCount: int (Required)
* updatesInProgressDeviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return device group update compliance information such as how many devices are on their latest update, how many
- * need new updates, and how many are in progress on receiving a new update along with {@link Response}.
+ * @return device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -625,40 +649,37 @@ public Response getUpdateComplianceForGroupWithResponse(String group
}
/**
- * Get the best available updates for a device group and a count of how many devices need each update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get the best available updates for a device group and a count of how many
+ * devices need each update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * groupId: String (Required)
- * deviceClassId: String (Required)
- * update (Required): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * deviceCount: int (Required)
+ * groupId: String (Required)
+ * deviceClassId: String (Required)
+ * update (Required): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
- * ]
- * nextLink: String (Optional)
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * deviceCount: int (Required)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the best available updates for a device group and a count of how many devices need each update as
- * paginated response with {@link PagedIterable}.
+ * @return the best available updates for a device group and a count of how many
+ * devices need each update as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -668,54 +689,49 @@ public PagedIterable listBestUpdatesForGroup(String groupId, Request
/**
* Gets a list of deployments for a device group.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | orderby | String | No | Orders the set of deployments returned. You can order by start date. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | orderby | String | No | Orders the set of deployments returned. You can order by start
+ * date. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deploymentId: String (Required)
- * startDateTime: OffsetDateTime (Required)
- * update (Required): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * groupId: String (Required)
- * deviceClassSubgroups (Optional): [
- * String (Optional)
- * ]
- * isCanceled: Boolean (Optional)
- * isRetried: Boolean (Optional)
- * rollbackPolicy (Optional): {
- * update (Required): (recursive schema, see update above)
- * failure (Required): {
- * devicesFailedPercentage: int (Required)
- * devicesFailedCount: int (Required)
- * }
- * }
- * isCloudInitiatedRollback: Boolean (Optional)
+ * deploymentId: String (Required)
+ * startDateTime: OffsetDateTime (Required)
+ * update (Required): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * groupId: String (Required)
+ * deviceClassSubgroups (Optional): [
+ * String (Optional)
* ]
- * nextLink: String (Optional)
+ * isCanceled: Boolean (Optional)
+ * isRetried: Boolean (Optional)
+ * rollbackPolicy (Optional): {
+ * update (Required): (recursive schema, see update above)
+ * failure (Required): {
+ * devicesFailedPercentage: int (Required)
+ * devicesFailedCount: int (Required)
+ * }
+ * }
+ * isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -732,10 +748,10 @@ public PagedIterable listDeploymentsForGroup(String groupId, Request
/**
* Gets the deployment properties.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -762,9 +778,11 @@ public PagedIterable listDeploymentsForGroup(String groupId, Request
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -783,10 +801,10 @@ public Response getDeploymentWithResponse(String groupId, String dep
/**
* Creates or updates a deployment.
- *
- * Request Body Schema
- *
- *
{@code
+ * Request Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -813,12 +831,15 @@ public Response getDeploymentWithResponse(String groupId, String dep
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -845,9 +866,11 @@ public Response getDeploymentWithResponse(String groupId, String dep
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param deployment The deployment properties.
@@ -868,7 +891,7 @@ public Response createOrUpdateDeploymentWithResponse(String groupId,
/**
* Deletes a deployment.
- *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -886,12 +909,12 @@ public Response deleteDeploymentWithResponse(String groupId, String deploy
}
/**
- * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* deploymentState: String(Active/ActiveWithSubgroupFailures/Failed/Inactive/Canceled) (Required)
@@ -924,8 +947,9 @@ public Response deleteDeploymentWithResponse(String groupId, String deploy
* }
* ]
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deploymentId Deployment identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -933,8 +957,8 @@ public Response deleteDeploymentWithResponse(String groupId, String deploy
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed along with {@link Response}.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -944,36 +968,33 @@ public Response getDeploymentStatusWithResponse(String groupId, Stri
}
/**
- * Get the device class subgroups for the group. A device class subgroup is the set of devices within the group that
- * share the same device class. All devices within the same device class are compatible with the same updates.
- *
- * Query Parameters
- *
+ * Get the device class subgroups for the group. A device class subgroup is the
+ * set of devices within the group that share the same device class. All devices
+ * within the same device class are compatible with the same updates.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of device class subgroups returned. You can filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and compatProperties/propertyName2 eq 'value2') |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of device class subgroups returned. You can
+ * filter on compat
+ * properties by name and value. (i.e. filter=compatProperties/propertyName1 eq
+ * 'value1' and compatProperties/propertyName2 eq 'value2') |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceClassId: String (Required)
- * groupId: String (Required)
- * createdDateTime: String (Required)
- * deviceCount: Integer (Optional)
- * deploymentId: String (Optional)
- * }
- * ]
- * nextLink: String (Optional)
+ * deviceClassId: String (Required)
+ * groupId: String (Required)
+ * createdDateTime: String (Required)
+ * deviceCount: Integer (Optional)
+ * deploymentId: String (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -989,12 +1010,13 @@ public PagedIterable listDeviceClassSubgroupsForGroup(String groupId
}
/**
- * Gets device class subgroup details. A device class subgroup is the set of devices within the group that share the
- * same device class. All devices within the same device class are compatible with the same updates.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets device class subgroup details. A device class subgroup is the set of
+ * devices within the group that share the same device class. All devices within
+ * the same device class are compatible with the same updates.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deviceClassId: String (Required)
* groupId: String (Required)
@@ -1002,8 +1024,9 @@ public PagedIterable listDeviceClassSubgroupsForGroup(String groupId
* deviceCount: Integer (Optional)
* deploymentId: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1021,12 +1044,15 @@ public Response getDeviceClassSubgroupWithResponse(String groupId, S
}
/**
- * Deletes a device class subgroup. This subgroup is automatically created when a Device Update-enabled device is
- * connected to the hub and reports its properties. Groups, subgroups, and deployments are not automatically cleaned
- * up but are retained for history purposes. Users can call this method to delete a subgroup if they do not need to
- * retain any of the history of the subgroup and no longer need it. If a device is ever connected again for this
- * subgroup after the subgroup was deleted it will be automatically re-created but there will be no history.
- *
+ * Deletes a device class subgroup. This subgroup is automatically created when a
+ * Device Update-enabled device is connected to the hub and reports its
+ * properties. Groups, subgroups, and deployments are not automatically cleaned up
+ * but are retained for history purposes. Users can call this method to delete a
+ * subgroup if they do not need to retain any of the history of the subgroup and
+ * no longer need it. If a device is ever connected again for this subgroup after
+ * the subgroup was deleted it will be automatically re-created but there will be
+ * no history.
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1044,20 +1070,22 @@ public Response deleteDeviceClassSubgroupWithResponse(String groupId, Stri
}
/**
- * Get device class subgroup update compliance information such as how many devices are on their latest update, how
- * many need new updates, and how many are in progress on receiving a new update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* totalDeviceCount: int (Required)
* onLatestUpdateDeviceCount: int (Required)
* newUpdatesAvailableDeviceCount: int (Required)
* updatesInProgressDeviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1065,9 +1093,9 @@ public Response deleteDeviceClassSubgroupWithResponse(String groupId, Stri
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return device class subgroup update compliance information such as how many devices are on their latest update,
- * how many need new updates, and how many are in progress on receiving a new update along with {@link
- * Response}.
+ * @return device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1078,11 +1106,12 @@ public Response getDeviceClassSubgroupUpdateComplianceWithResponse(S
}
/**
- * Get the best available update for a device class subgroup and a count of how many devices need this update.
- *
- * Response Body Schema
- *
- *
{@code
+ * Get the best available update for a device class subgroup and a count of how
+ * many devices need this update.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* deviceClassId: String (Required)
@@ -1097,8 +1126,9 @@ public Response getDeviceClassSubgroupUpdateComplianceWithResponse(S
* }
* deviceCount: int (Required)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1106,8 +1136,8 @@ public Response getDeviceClassSubgroupUpdateComplianceWithResponse(S
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the best available update for a device class subgroup and a count of how many devices need this update
- * along with {@link Response}.
+ * @return the best available update for a device class subgroup and a count of how
+ * many devices need this update along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1119,54 +1149,49 @@ public Response getBestUpdatesForDeviceClassSubgroupWithResponse(Str
/**
* Gets a list of deployments for a device class subgroup.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | orderby | String | No | Orders the set of deployments returned. You can order by start date. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | orderby | String | No | Orders the set of deployments returned. You can order by start
+ * date. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deploymentId: String (Required)
- * startDateTime: OffsetDateTime (Required)
- * update (Required): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * groupId: String (Required)
- * deviceClassSubgroups (Optional): [
- * String (Optional)
- * ]
- * isCanceled: Boolean (Optional)
- * isRetried: Boolean (Optional)
- * rollbackPolicy (Optional): {
- * update (Required): (recursive schema, see update above)
- * failure (Required): {
- * devicesFailedPercentage: int (Required)
- * devicesFailedCount: int (Required)
- * }
- * }
- * isCloudInitiatedRollback: Boolean (Optional)
+ * deploymentId: String (Required)
+ * startDateTime: OffsetDateTime (Required)
+ * update (Required): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * groupId: String (Required)
+ * deviceClassSubgroups (Optional): [
+ * String (Optional)
* ]
- * nextLink: String (Optional)
+ * isCanceled: Boolean (Optional)
+ * isRetried: Boolean (Optional)
+ * rollbackPolicy (Optional): {
+ * update (Required): (recursive schema, see update above)
+ * failure (Required): {
+ * devicesFailedPercentage: int (Required)
+ * devicesFailedCount: int (Required)
+ * }
+ * }
+ * isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1185,10 +1210,10 @@ public PagedIterable listDeploymentsForDeviceClassSubgroup(String gr
/**
* Gets the deployment properties.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1215,9 +1240,11 @@ public PagedIterable listDeploymentsForDeviceClassSubgroup(String gr
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1238,7 +1265,7 @@ public Response getDeploymentForDeviceClassSubgroupWithResponse(Stri
/**
* Deletes a device class subgroup deployment.
- *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1259,10 +1286,10 @@ public Response deleteDeploymentForDeviceClassSubgroupWithResponse(String
/**
* Stops a deployment.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1289,9 +1316,11 @@ public Response deleteDeploymentForDeviceClassSubgroupWithResponse(String
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1311,10 +1340,10 @@ public Response stopDeploymentWithResponse(String groupId, String de
/**
* Retries a deployment with failed devices.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1341,9 +1370,11 @@ public Response stopDeploymentWithResponse(String groupId, String de
* }
* }
* isCloudInitiatedRollback: Boolean (Optional)
+ * downloadSecurity: String(https/http) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1362,12 +1393,12 @@ public Response retryDeploymentWithResponse(String groupId, String d
}
/**
- * Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed.
- *
- * Response Body Schema
- *
- *
{@code
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* groupId: String (Required)
* deviceClassId: String (Required)
@@ -1393,8 +1424,9 @@ public Response retryDeploymentWithResponse(String groupId, String d
* devicesCompletedSucceededCount: Integer (Optional)
* devicesCanceledCount: Integer (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1403,8 +1435,8 @@ public Response retryDeploymentWithResponse(String groupId, String d
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the status of a deployment including a breakdown of how many devices in the deployment are in progress,
- * completed, or failed along with {@link Response}.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1415,35 +1447,31 @@ public Response getDeviceClassSubgroupDeploymentStatusWithResponse(S
}
/**
- * Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices.
- *
- * Query Parameters
- *
+ * Gets a list of devices in a deployment along with their state. Useful for
+ * getting a list of failed devices.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of deployment device states returned. You can
+ * filter on
+ * deviceId and moduleId and/or deviceState. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * retryCount: int (Required)
- * movedOnToNewDeployment: boolean (Required)
- * deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
- * }
- * ]
- * nextLink: String (Optional)
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
+ * retryCount: int (Required)
+ * movedOnToNewDeployment: boolean (Required)
+ * deviceState: String(Succeeded/InProgress/Canceled/Failed) (Required)
+ * }
* }
- * }
- *
+ *
+ *
* @param groupId Group identifier.
* @param deviceClassId Device class identifier.
* @param deploymentId Deployment identifier.
@@ -1452,8 +1480,8 @@ public Response getDeviceClassSubgroupDeploymentStatusWithResponse(S
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of devices in a deployment along with their state as paginated response with {@link
- * PagedIterable}.
+ * @return a list of devices in a deployment along with their state as paginated response with
+ * {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -1465,20 +1493,19 @@ public PagedIterable listDeviceStatesForDeviceClassSubgroupDeploymen
/**
* Retrieve operation status.
- *
- * Header Parameters
- *
+ *
Header Parameters
*
- * Header Parameters
- * | Name | Type | Required | Description |
- * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will
+ * be performed only if
+ * the ETag on the server does not match this value. |
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Required)
* status: String(NotStarted/Running/Succeeded/Failed) (Required)
@@ -1502,8 +1529,9 @@ public PagedIterable listDeviceStatesForDeviceClassSubgroupDeploymen
* createdDateTime: OffsetDateTime (Required)
* etag: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param operationId Operation identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1519,52 +1547,51 @@ public Response getOperationStatusWithResponse(String operationId, R
}
/**
- * Get a list of all device import operations. Completed operations are kept for 7 days before auto-deleted.
- *
- * Query Parameters
- *
+ * Get a list of all device import operations. Completed operations are kept for 7
+ * days before auto-deleted.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
- * | top | Integer | No | Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Restricts the set of operations returned. Only one specific
+ * filter is
+ * supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * | top | Integer | No | Specifies a non-negative integer n that limits the number of items
+ * returned
+ * from a collection. The service returns the number of available items up to but
+ * not greater than the specified value n. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * operationId: String (Required)
- * status: String(NotStarted/Running/Succeeded/Failed) (Required)
- * error (Optional): {
- * code: String (Required)
- * message: String (Required)
- * target: String (Optional)
- * details (Optional): [
- * (recursive schema, see above)
- * ]
- * innererror (Optional): {
- * code: String (Required)
- * message: String (Optional)
- * errorDetail: String (Optional)
- * innerError (Optional): (recursive schema, see innerError above)
- * }
- * occurredDateTime: OffsetDateTime (Optional)
- * }
- * traceId: String (Optional)
- * lastActionDateTime: OffsetDateTime (Required)
- * createdDateTime: OffsetDateTime (Required)
- * etag: String (Optional)
+ * operationId: String (Required)
+ * status: String(NotStarted/Running/Succeeded/Failed) (Required)
+ * error (Optional): {
+ * code: String (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String (Required)
+ * message: String (Optional)
+ * errorDetail: String (Optional)
+ * innerError (Optional): (recursive schema, see innerError above)
* }
- * ]
- * nextLink: String (Optional)
+ * occurredDateTime: OffsetDateTime (Optional)
+ * }
+ * traceId: String (Optional)
+ * lastActionDateTime: OffsetDateTime (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * etag: String (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1580,10 +1607,10 @@ public PagedIterable listOperationStatuses(RequestOptions requestOpt
/**
* Start the device diagnostics log collection on specified devices.
- *
- * Request Body Schema
- *
- *
{@code
+ * Request Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* deviceList (Required): [
@@ -1597,11 +1624,13 @@ public PagedIterable listOperationStatuses(RequestOptions requestOpt
* lastActionDateTime: String (Optional)
* status: String(NotStarted/Running/Succeeded/Failed) (Optional)
* }
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* deviceList (Required): [
@@ -1615,8 +1644,9 @@ public PagedIterable listOperationStatuses(RequestOptions requestOpt
* lastActionDateTime: String (Optional)
* status: String(NotStarted/Running/Succeeded/Failed) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param logCollectionId Log collection identifier.
* @param logCollection The log collection properties.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1635,10 +1665,10 @@ public Response startLogCollectionWithResponse(String logCollectionI
/**
* Get the device diagnostics log collection.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* deviceList (Required): [
@@ -1652,8 +1682,9 @@ public Response startLogCollectionWithResponse(String logCollectionI
* lastActionDateTime: String (Optional)
* status: String(NotStarted/Running/Succeeded/Failed) (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param logCollectionId Log collection identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1670,30 +1701,26 @@ public Response getLogCollectionWithResponse(String logCollectionId,
/**
* Get all device diagnostics log collections.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
+ * operationId: String (Optional)
+ * deviceList (Required): [
* (Required){
- * operationId: String (Optional)
- * deviceList (Required): [
- * (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * }
- * ]
- * description: String (Optional)
- * createdDateTime: String (Optional)
- * lastActionDateTime: String (Optional)
- * status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
* }
* ]
- * nextLink: String (Optional)
+ * description: String (Optional)
+ * createdDateTime: String (Optional)
+ * lastActionDateTime: String (Optional)
+ * status: String(NotStarted/Running/Succeeded/Failed) (Optional)
+ * }
* }
- * }
- *
+ *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1709,10 +1736,10 @@ public PagedIterable listLogCollections(RequestOptions requestOption
/**
* Get log collection with detailed status.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Optional)
* createdDateTime: String (Optional)
@@ -1730,8 +1757,9 @@ public PagedIterable listLogCollections(RequestOptions requestOption
* ]
* description: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param logCollectionId Log collection identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1749,31 +1777,27 @@ public Response getLogCollectionDetailedStatusWithResponse(String lo
/**
* Get list of device health.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
+ * deviceId: String (Required)
+ * moduleId: String (Optional)
+ * state: String(healthy/unhealthy) (Required)
+ * digitalTwinModelId: String (Optional)
+ * healthChecks (Required): [
* (Required){
- * deviceId: String (Required)
- * moduleId: String (Optional)
- * state: String(healthy/unhealthy) (Required)
- * digitalTwinModelId: String (Optional)
- * healthChecks (Required): [
- * (Required){
- * name: String (Optional)
- * result: String(success/userError) (Optional)
- * }
- * ]
+ * name: String (Optional)
+ * result: String(success/userError) (Optional)
* }
* ]
- * nextLink: String (Optional)
* }
- * }
- *
- * @param filter Restricts the set of devices for which device health is returned. You can filter on status, device
- * id and module id.
+ * }
+ *
+ *
+ * @param filter Restricts the set of devices for which device health is returned. You can
+ * filter on status, device id and module id.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1786,4 +1810,1140 @@ public Response getLogCollectionDetailedStatusWithResponse(String lo
public PagedIterable listHealthOfDevices(String filter, RequestOptions requestOptions) {
return this.serviceClient.listHealthOfDevices(filter, requestOptions);
}
+
+ /**
+ * Gets a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub.
+ *
+ * @param filter Restricts the set of device classes returned. You can filter on friendly name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceClasses(String filter) {
+ // Generated convenience method for listDeviceClasses
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ return serviceClient.listDeviceClasses(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceClass.class));
+ }
+
+ /**
+ * Gets a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device classes (sets of devices compatible with the same
+ * updates based on the model Id and compat properties reported in the Device
+ * Update PnP interface in IoT Hub) for all devices connected to Device Update for
+ * IoT Hub as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceClasses() {
+ // Generated convenience method for listDeviceClasses
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDeviceClasses(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceClass.class));
+ }
+
+ /**
+ * Gets the properties of a device class.
+ *
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of a device class.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceClass getDeviceClass(String deviceClassId) {
+ // Generated convenience method for getDeviceClassWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassWithResponse(deviceClassId, requestOptions).getValue().toObject(DeviceClass.class);
+ }
+
+ /**
+ * Update device class details.
+ *
+ * @param deviceClassId Device class identifier.
+ * @param deviceClassPatch The device class json merge patch body. Currently only supports patching
+ * friendlyName.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device class metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceClass updateDeviceClass(String deviceClassId, PatchBody deviceClassPatch) {
+ // Generated convenience method for updateDeviceClassWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getPatchBodyAccessor().prepareModelForJsonMergePatch(deviceClassPatch, true);
+ BinaryData deviceClassPatchInBinaryData = BinaryData.fromObject(deviceClassPatch);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ deviceClassPatchInBinaryData.getLength();
+ JsonMergePatchHelper.getPatchBodyAccessor().prepareModelForJsonMergePatch(deviceClassPatch, false);
+ return updateDeviceClassWithResponse(deviceClassId, deviceClassPatchInBinaryData, requestOptions).getValue()
+ .toObject(DeviceClass.class);
+ }
+
+ /**
+ * Deletes a device class. Device classes are created automatically when Device
+ * Update-enabled devices are connected to the hub but are not automatically
+ * cleaned up since they are referenced by DeviceClassSubgroups. If the user has
+ * deleted all DeviceClassSubgroups for a device class they can also delete the
+ * device class to remove the records from the system and to stop checking the
+ * compatibility of this device class with new updates. If a device is ever
+ * reconnected for this device class it will be re-created.
+ *
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteDeviceClass(String deviceClassId) {
+ // Generated convenience method for deleteDeviceClassWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteDeviceClassWithResponse(deviceClassId, requestOptions).getValue();
+ }
+
+ /**
+ * Gets a list of installable updates for a device class.
+ *
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of installable updates for a device class as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listInstallableUpdatesForDeviceClass(String deviceClassId) {
+ // Generated convenience method for listInstallableUpdatesForDeviceClass
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listInstallableUpdatesForDeviceClass(deviceClassId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(UpdateInfo.class));
+ }
+
+ /**
+ * Gets a list of devices connected to Device Update for IoT Hub.
+ *
+ * @param filter Restricts the set of devices returned. You can filter on GroupId,
+ * DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to
+ * query for devices with no deployment status (that have never been deployed to).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices connected to Device Update for IoT Hub as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDevices(String filter) {
+ // Generated convenience method for listDevices
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ return serviceClient.listDevices(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(Device.class));
+ }
+
+ /**
+ * Gets a list of devices connected to Device Update for IoT Hub.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices connected to Device Update for IoT Hub as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDevices() {
+ // Generated convenience method for listDevices
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDevices(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(Device.class));
+ }
+
+ /**
+ * Import existing devices from IoT Hub. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
+ *
+ * @param importType The types of devices to import.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller beginImportDevices(ImportType importType) {
+ // Generated convenience method for beginImportDevicesWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginImportDevicesWithModel(
+ BinaryData.fromObject(importType == null ? null : importType.toString()), requestOptions);
+ }
+
+ /**
+ * Gets the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub.
+ *
+ * @param deviceId Device identifier in Azure IoT Hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device properties and latest deployment status for a device connected
+ * to Device Update for IoT Hub.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Device getDevice(String deviceId) {
+ // Generated convenience method for getDeviceWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceWithResponse(deviceId, requestOptions).getValue().toObject(Device.class);
+ }
+
+ /**
+ * Gets the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub.
+ *
+ * @param deviceId Device identifier in Azure IoT Hub.
+ * @param moduleId Device module identifier in Azure IoT Hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device module properties and latest deployment status for a device
+ * module connected to Device Update for IoT Hub.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Device getDeviceModule(String deviceId, String moduleId) {
+ // Generated convenience method for getDeviceModuleWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceModuleWithResponse(deviceId, moduleId, requestOptions).getValue().toObject(Device.class);
+ }
+
+ /**
+ * Gets the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the breakdown of how many devices are on their latest update, have new
+ * updates available, or are in progress receiving new updates.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UpdateCompliance getUpdateCompliance() {
+ // Generated convenience method for getUpdateComplianceWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUpdateComplianceWithResponse(requestOptions).getValue().toObject(UpdateCompliance.class);
+ }
+
+ /**
+ * Gets a list of all device groups. The $default group will always be returned
+ * first.
+ *
+ * @param orderBy Orders the set of groups returned. You can order by groupId, deviceCount,
+ * createdDate, subgroupsWithNewUpdatesAvailableCount,
+ * subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device groups as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listGroups(String orderBy) {
+ // Generated convenience method for listGroups
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ return serviceClient.listGroups(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(Group.class));
+ }
+
+ /**
+ * Gets a list of all device groups. The $default group will always be returned
+ * first.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device groups as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listGroups() {
+ // Generated convenience method for listGroups
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listGroups(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(Group.class));
+ }
+
+ /**
+ * Gets the device group properties.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device group properties.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Group getGroup(String groupId) {
+ // Generated convenience method for getGroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getGroupWithResponse(groupId, requestOptions).getValue().toObject(Group.class);
+ }
+
+ /**
+ * Deletes a device group. This group is automatically created when a Device
+ * Update-enabled device is connected to the hub and reports its properties.
+ * Groups, subgroups, and deployments are not automatically cleaned up but are
+ * retained for history purposes. Users can call this method to delete a group if
+ * they do not need to retain any of the history of the group and no longer need
+ * it. If a device is ever connected again for this group after the group was
+ * deleted it will be automatically re-created but there will be no history.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteGroup(String groupId) {
+ // Generated convenience method for deleteGroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteGroupWithResponse(groupId, requestOptions).getValue();
+ }
+
+ /**
+ * Get device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device group update compliance information such as how many devices are on
+ * their latest update, how many need new updates, and how many are in progress on
+ * receiving a new update.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UpdateCompliance getUpdateComplianceForGroup(String groupId) {
+ // Generated convenience method for getUpdateComplianceForGroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUpdateComplianceForGroupWithResponse(groupId, requestOptions).getValue()
+ .toObject(UpdateCompliance.class);
+ }
+
+ /**
+ * Get the best available updates for a device group and a count of how many
+ * devices need each update.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the best available updates for a device group and a count of how many
+ * devices need each update as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBestUpdatesForGroup(String groupId) {
+ // Generated convenience method for listBestUpdatesForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listBestUpdatesForGroup(groupId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceClassSubgroupUpdatableDevices.class));
+ }
+
+ /**
+ * Gets a list of deployments for a device group.
+ *
+ * @param groupId Group identifier.
+ * @param orderBy Orders the set of deployments returned. You can order by start date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device group as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentsForGroup(String groupId, String orderBy) {
+ // Generated convenience method for listDeploymentsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ return serviceClient.listDeploymentsForGroup(groupId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(Deployment.class));
+ }
+
+ /**
+ * Gets a list of deployments for a device group.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device group as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentsForGroup(String groupId) {
+ // Generated convenience method for listDeploymentsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDeploymentsForGroup(groupId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(Deployment.class));
+ }
+
+ /**
+ * Gets the deployment properties.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the deployment properties.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Deployment getDeployment(String groupId, String deploymentId) {
+ // Generated convenience method for getDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentWithResponse(groupId, deploymentId, requestOptions).getValue().toObject(Deployment.class);
+ }
+
+ /**
+ * Creates or updates a deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @param deployment The deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return deployment metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Deployment createOrUpdateDeployment(String groupId, String deploymentId, Deployment deployment) {
+ // Generated convenience method for createOrUpdateDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createOrUpdateDeploymentWithResponse(groupId, deploymentId, BinaryData.fromObject(deployment),
+ requestOptions).getValue().toObject(Deployment.class);
+ }
+
+ /**
+ * Deletes a deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteDeployment(String groupId, String deploymentId) {
+ // Generated convenience method for deleteDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteDeploymentWithResponse(groupId, deploymentId, requestOptions).getValue();
+ }
+
+ /**
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ *
+ * @param groupId Group identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeploymentStatus getDeploymentStatus(String groupId, String deploymentId) {
+ // Generated convenience method for getDeploymentStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentStatusWithResponse(groupId, deploymentId, requestOptions).getValue()
+ .toObject(DeploymentStatus.class);
+ }
+
+ /**
+ * Get the device class subgroups for the group. A device class subgroup is the
+ * set of devices within the group that share the same device class. All devices
+ * within the same device class are compatible with the same updates.
+ *
+ * @param groupId Group identifier.
+ * @param filter Restricts the set of device class subgroups returned. You can filter on compat
+ * properties by name and value. (i.e. filter=compatProperties/propertyName1 eq
+ * 'value1' and compatProperties/propertyName2 eq 'value2').
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device class subgroups for the group as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceClassSubgroupsForGroup(String groupId, String filter) {
+ // Generated convenience method for listDeviceClassSubgroupsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ return serviceClient.listDeviceClassSubgroupsForGroup(groupId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceClassSubgroup.class));
+ }
+
+ /**
+ * Get the device class subgroups for the group. A device class subgroup is the
+ * set of devices within the group that share the same device class. All devices
+ * within the same device class are compatible with the same updates.
+ *
+ * @param groupId Group identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device class subgroups for the group as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceClassSubgroupsForGroup(String groupId) {
+ // Generated convenience method for listDeviceClassSubgroupsForGroup
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDeviceClassSubgroupsForGroup(groupId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceClassSubgroup.class));
+ }
+
+ /**
+ * Gets device class subgroup details. A device class subgroup is the set of
+ * devices within the group that share the same device class. All devices within
+ * the same device class are compatible with the same updates.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device class subgroup details.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceClassSubgroup getDeviceClassSubgroup(String groupId, String deviceClassId) {
+ // Generated convenience method for getDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions).getValue()
+ .toObject(DeviceClassSubgroup.class);
+ }
+
+ /**
+ * Deletes a device class subgroup. This subgroup is automatically created when a
+ * Device Update-enabled device is connected to the hub and reports its
+ * properties. Groups, subgroups, and deployments are not automatically cleaned up
+ * but are retained for history purposes. Users can call this method to delete a
+ * subgroup if they do not need to retain any of the history of the subgroup and
+ * no longer need it. If a device is ever connected again for this subgroup after
+ * the subgroup was deleted it will be automatically re-created but there will be
+ * no history.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteDeviceClassSubgroup(String groupId, String deviceClassId) {
+ // Generated convenience method for deleteDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions).getValue();
+ }
+
+ /**
+ * Get device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return device class subgroup update compliance information such as how many
+ * devices are on their latest update, how many need new updates, and how many are
+ * in progress on receiving a new update.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UpdateCompliance getDeviceClassSubgroupUpdateCompliance(String groupId, String deviceClassId) {
+ // Generated convenience method for getDeviceClassSubgroupUpdateComplianceWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassSubgroupUpdateComplianceWithResponse(groupId, deviceClassId, requestOptions).getValue()
+ .toObject(UpdateCompliance.class);
+ }
+
+ /**
+ * Get the best available update for a device class subgroup and a count of how
+ * many devices need this update.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the best available update for a device class subgroup and a count of how
+ * many devices need this update.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceClassSubgroupUpdatableDevices getBestUpdatesForDeviceClassSubgroup(String groupId,
+ String deviceClassId) {
+ // Generated convenience method for getBestUpdatesForDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getBestUpdatesForDeviceClassSubgroupWithResponse(groupId, deviceClassId, requestOptions).getValue()
+ .toObject(DeviceClassSubgroupUpdatableDevices.class);
+ }
+
+ /**
+ * Gets a list of deployments for a device class subgroup.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param orderBy Orders the set of deployments returned. You can order by start date.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device class subgroup as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId,
+ String orderBy) {
+ // Generated convenience method for listDeploymentsForDeviceClassSubgroup
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ return serviceClient.listDeploymentsForDeviceClassSubgroup(groupId, deviceClassId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(Deployment.class));
+ }
+
+ /**
+ * Gets a list of deployments for a device class subgroup.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of deployments for a device class subgroup as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeploymentsForDeviceClassSubgroup(String groupId, String deviceClassId) {
+ // Generated convenience method for listDeploymentsForDeviceClassSubgroup
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listDeploymentsForDeviceClassSubgroup(groupId, deviceClassId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(Deployment.class));
+ }
+
+ /**
+ * Gets the deployment properties.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the deployment properties.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Deployment getDeploymentForDeviceClassSubgroup(String groupId, String deviceClassId, String deploymentId) {
+ // Generated convenience method for getDeploymentForDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .getValue()
+ .toObject(Deployment.class);
+ }
+
+ /**
+ * Deletes a device class subgroup deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteDeploymentForDeviceClassSubgroup(String groupId, String deviceClassId, String deploymentId) {
+ // Generated convenience method for deleteDeploymentForDeviceClassSubgroupWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .getValue();
+ }
+
+ /**
+ * Stops a deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return deployment metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Deployment stopDeployment(String groupId, String deviceClassId, String deploymentId) {
+ // Generated convenience method for stopDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return stopDeploymentWithResponse(groupId, deviceClassId, deploymentId, requestOptions).getValue()
+ .toObject(Deployment.class);
+ }
+
+ /**
+ * Retries a deployment with failed devices.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return deployment metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Deployment retryDeployment(String groupId, String deviceClassId, String deploymentId) {
+ // Generated convenience method for retryDeploymentWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return retryDeploymentWithResponse(groupId, deviceClassId, deploymentId, requestOptions).getValue()
+ .toObject(Deployment.class);
+ }
+
+ /**
+ * Gets the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of a deployment including a breakdown of how many devices in
+ * the deployment are in progress, completed, or failed.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceClassSubgroupDeploymentStatus getDeviceClassSubgroupDeploymentStatus(String groupId,
+ String deviceClassId, String deploymentId) {
+ // Generated convenience method for getDeviceClassSubgroupDeploymentStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getDeviceClassSubgroupDeploymentStatusWithResponse(groupId, deviceClassId, deploymentId, requestOptions)
+ .getValue()
+ .toObject(DeviceClassSubgroupDeploymentStatus.class);
+ }
+
+ /**
+ * Gets a list of devices in a deployment along with their state. Useful for
+ * getting a list of failed devices.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @param filter Restricts the set of deployment device states returned. You can filter on
+ * deviceId and moduleId and/or deviceState.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices in a deployment along with their state as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceStatesForDeviceClassSubgroupDeployment(String groupId,
+ String deviceClassId, String deploymentId, String filter) {
+ // Generated convenience method for listDeviceStatesForDeviceClassSubgroupDeployment
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ return serviceClient
+ .listDeviceStatesForDeviceClassSubgroupDeployment(groupId, deviceClassId, deploymentId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeploymentDeviceState.class));
+ }
+
+ /**
+ * Gets a list of devices in a deployment along with their state. Useful for
+ * getting a list of failed devices.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of devices in a deployment along with their state as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listDeviceStatesForDeviceClassSubgroupDeployment(String groupId,
+ String deviceClassId, String deploymentId) {
+ // Generated convenience method for listDeviceStatesForDeviceClassSubgroupDeployment
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient
+ .listDeviceStatesForDeviceClassSubgroupDeployment(groupId, deviceClassId, deploymentId, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeploymentDeviceState.class));
+ }
+
+ /**
+ * Retrieve operation status.
+ *
+ * @param operationId Operation identifier.
+ * @param ifNoneMatch Defines the If-None-Match condition. The operation will be performed only if
+ * the ETag on the server does not match this value.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceOperation getOperationStatus(String operationId, String ifNoneMatch) {
+ // Generated convenience method for getOperationStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (ifNoneMatch != null) {
+ requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch);
+ }
+ return getOperationStatusWithResponse(operationId, requestOptions).getValue().toObject(DeviceOperation.class);
+ }
+
+ /**
+ * Retrieve operation status.
+ *
+ * @param operationId Operation identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return operation metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DeviceOperation getOperationStatus(String operationId) {
+ // Generated convenience method for getOperationStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getOperationStatusWithResponse(operationId, requestOptions).getValue().toObject(DeviceOperation.class);
+ }
+
+ /**
+ * Get a list of all device import operations. Completed operations are kept for 7
+ * days before auto-deleted.
+ *
+ * @param filter Restricts the set of operations returned. Only one specific filter is
+ * supported: "status eq 'NotStarted' or status eq 'Running'".
+ * @param top Specifies a non-negative integer n that limits the number of items returned
+ * from a collection. The service returns the number of available items up to but
+ * not greater than the specified value n.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device import operations as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listOperationStatuses(String filter, Integer top) {
+ // Generated convenience method for listOperationStatuses
+ RequestOptions requestOptions = new RequestOptions();
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ if (top != null) {
+ requestOptions.addQueryParam("top", String.valueOf(top), false);
+ }
+ return serviceClient.listOperationStatuses(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceOperation.class));
+ }
+
+ /**
+ * Get a list of all device import operations. Completed operations are kept for 7
+ * days before auto-deleted.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all device import operations as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listOperationStatuses() {
+ // Generated convenience method for listOperationStatuses
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listOperationStatuses(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceOperation.class));
+ }
+
+ /**
+ * Start the device diagnostics log collection on specified devices.
+ *
+ * @param logCollectionId Log collection identifier.
+ * @param logCollection The log collection properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return diagnostics request body.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LogCollection startLogCollection(String logCollectionId, LogCollection logCollection) {
+ // Generated convenience method for startLogCollectionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return startLogCollectionWithResponse(logCollectionId, BinaryData.fromObject(logCollection), requestOptions)
+ .getValue()
+ .toObject(LogCollection.class);
+ }
+
+ /**
+ * Get the device diagnostics log collection.
+ *
+ * @param logCollectionId Log collection identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the device diagnostics log collection.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LogCollection getLogCollection(String logCollectionId) {
+ // Generated convenience method for getLogCollectionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLogCollectionWithResponse(logCollectionId, requestOptions).getValue().toObject(LogCollection.class);
+ }
+
+ /**
+ * Get all device diagnostics log collections.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all device diagnostics log collections as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listLogCollections() {
+ // Generated convenience method for listLogCollections
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listLogCollections(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(LogCollection.class));
+ }
+
+ /**
+ * Get log collection with detailed status.
+ *
+ * @param logCollectionId Log collection identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log collection with detailed status.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LogCollectionOperationDetailedStatus getLogCollectionDetailedStatus(String logCollectionId) {
+ // Generated convenience method for getLogCollectionDetailedStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLogCollectionDetailedStatusWithResponse(logCollectionId, requestOptions).getValue()
+ .toObject(LogCollectionOperationDetailedStatus.class);
+ }
+
+ /**
+ * Get list of device health.
+ *
+ * @param filter Restricts the set of devices for which device health is returned. You can
+ * filter on status, device id and module id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of device health as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listHealthOfDevices(String filter) {
+ // Generated convenience method for listHealthOfDevices
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listHealthOfDevices(filter, requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(DeviceHealth.class));
+ }
}
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java
index f0ec24224173..1b4087225ab6 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.iot.deviceupdate;
@@ -20,7 +20,6 @@
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.AddHeadersPolicy;
import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -33,14 +32,17 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.builder.ClientBuilderUtil;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
-import com.azure.iot.deviceupdate.implementation.DeviceUpdateClientImpl;
+import com.azure.iot.deviceupdate.implementation.DeviceManagementClientImpl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-/** A builder for creating a new instance of the DeviceManagementClient type. */
+/**
+ * A builder for creating a new instance of the DeviceManagementClient type.
+ */
@ServiceClientBuilder(serviceClients = { DeviceManagementClient.class, DeviceManagementAsyncClient.class })
public final class DeviceManagementClientBuilder
implements HttpTrait, ConfigurationTrait,
@@ -60,37 +62,46 @@ public final class DeviceManagementClientBuilder
@Generated
private final List pipelinePolicies;
- /** Create an instance of the DeviceManagementClientBuilder. */
+ /**
+ * Create an instance of the DeviceManagementClientBuilder.
+ */
@Generated
public DeviceManagementClientBuilder() {
this.pipelinePolicies = new ArrayList<>();
}
/*
- * The HTTP pipeline to send requests through.
+ * The HTTP client used to send the request.
*/
@Generated
- private HttpPipeline pipeline;
+ private HttpClient httpClient;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
- public DeviceManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public DeviceManagementClientBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
return this;
}
/*
- * The HTTP client used to send the request.
+ * The HTTP pipeline to send requests through.
*/
@Generated
- private HttpClient httpClient;
+ private HttpPipeline pipeline;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
- public DeviceManagementClientBuilder httpClient(HttpClient httpClient) {
- this.httpClient = httpClient;
+ public DeviceManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ if (this.pipeline != null && pipeline == null) {
+ LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
+ }
+ this.pipeline = pipeline;
return this;
}
@@ -100,7 +111,9 @@ public DeviceManagementClientBuilder httpClient(HttpClient httpClient) {
@Generated
private HttpLogOptions httpLogOptions;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
@@ -114,7 +127,9 @@ public DeviceManagementClientBuilder httpLogOptions(HttpLogOptions httpLogOption
@Generated
private ClientOptions clientOptions;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder clientOptions(ClientOptions clientOptions) {
@@ -128,7 +143,9 @@ public DeviceManagementClientBuilder clientOptions(ClientOptions clientOptions)
@Generated
private RetryOptions retryOptions;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder retryOptions(RetryOptions retryOptions) {
@@ -136,7 +153,9 @@ public DeviceManagementClientBuilder retryOptions(RetryOptions retryOptions) {
return this;
}
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
@@ -151,7 +170,9 @@ public DeviceManagementClientBuilder addPolicy(HttpPipelinePolicy customPolicy)
@Generated
private Configuration configuration;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder configuration(Configuration configuration) {
@@ -165,7 +186,9 @@ public DeviceManagementClientBuilder configuration(Configuration configuration)
@Generated
private TokenCredential tokenCredential;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder credential(TokenCredential tokenCredential) {
@@ -179,7 +202,9 @@ public DeviceManagementClientBuilder credential(TokenCredential tokenCredential)
@Generated
private String endpoint;
- /** {@inheritDoc}. */
+ /**
+ * {@inheritDoc}.
+ */
@Generated
@Override
public DeviceManagementClientBuilder endpoint(String endpoint) {
@@ -195,7 +220,7 @@ public DeviceManagementClientBuilder endpoint(String endpoint) {
/**
* Sets The Device Update for IoT Hub account instance identifier.
- *
+ *
* @param instanceId the instanceId value.
* @return the DeviceManagementClientBuilder.
*/
@@ -213,7 +238,7 @@ public DeviceManagementClientBuilder instanceId(String instanceId) {
/**
* Sets Service version.
- *
+ *
* @param serviceVersion the serviceVersion value.
* @return the DeviceManagementClientBuilder.
*/
@@ -231,7 +256,7 @@ public DeviceManagementClientBuilder serviceVersion(DeviceUpdateServiceVersion s
/**
* Sets The retry policy that will attempt to retry failed requests, if applicable.
- *
+ *
* @param retryPolicy the retryPolicy value.
* @return the DeviceManagementClientBuilder.
*/
@@ -242,20 +267,29 @@ public DeviceManagementClientBuilder retryPolicy(RetryPolicy retryPolicy) {
}
/**
- * Builds an instance of DeviceUpdateClientImpl with the provided parameters.
- *
- * @return an instance of DeviceUpdateClientImpl.
+ * Builds an instance of DeviceManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of DeviceManagementClientImpl.
*/
@Generated
- private DeviceUpdateClientImpl buildInnerClient() {
+ private DeviceManagementClientImpl buildInnerClient() {
+ this.validateClient();
HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline();
DeviceUpdateServiceVersion localServiceVersion
= (serviceVersion != null) ? serviceVersion : DeviceUpdateServiceVersion.getLatest();
- DeviceUpdateClientImpl client = new DeviceUpdateClientImpl(localPipeline,
- JacksonAdapter.createDefaultSerializerAdapter(), endpoint, instanceId, localServiceVersion);
+ DeviceManagementClientImpl client = new DeviceManagementClientImpl(localPipeline,
+ JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, this.instanceId, localServiceVersion);
return client;
}
+ @Generated
+ private void validateClient() {
+ // This method is invoked from 'buildInnerClient'/'buildClient' method.
+ // Developer can customize this method, to validate that the necessary conditions are met for the new client.
+ Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
+ Objects.requireNonNull(instanceId, "'instanceId' cannot be null.");
+ }
+
@Generated
private HttpPipeline createHttpPipeline() {
Configuration buildConfiguration
@@ -269,9 +303,8 @@ private HttpPipeline createHttpPipeline() {
policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
- HttpHeaders headers = new HttpHeaders();
- localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue()));
- if (headers.getSize() > 0) {
+ HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions);
+ if (headers != null) {
policies.add(new AddHeadersPolicy(headers));
}
this.pipelinePolicies.stream()
@@ -280,7 +313,6 @@ private HttpPipeline createHttpPipeline() {
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
policies.add(new AddDatePolicy());
- policies.add(new CookiePolicy());
if (tokenCredential != null) {
policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
}
@@ -288,7 +320,7 @@ private HttpPipeline createHttpPipeline() {
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.forEach(p -> policies.add(p));
HttpPolicyProviders.addAfterRetryPolicies(policies);
- policies.add(new HttpLoggingPolicy(httpLogOptions));
+ policies.add(new HttpLoggingPolicy(localHttpLogOptions));
HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
.clientOptions(localClientOptions)
@@ -298,21 +330,23 @@ private HttpPipeline createHttpPipeline() {
/**
* Builds an instance of DeviceManagementAsyncClient class.
- *
+ *
* @return an instance of DeviceManagementAsyncClient.
*/
@Generated
public DeviceManagementAsyncClient buildAsyncClient() {
- return new DeviceManagementAsyncClient(buildInnerClient().getDeviceManagements());
+ return new DeviceManagementAsyncClient(buildInnerClient());
}
/**
* Builds an instance of DeviceManagementClient class.
- *
+ *
* @return an instance of DeviceManagementClient.
*/
@Generated
public DeviceManagementClient buildClient() {
- return new DeviceManagementClient(buildInnerClient().getDeviceManagements());
+ return new DeviceManagementClient(buildInnerClient());
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(DeviceManagementClientBuilder.class);
}
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java
index 0c4d2df328eb..4f2e137aa200 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateAsyncClient.java
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.iot.deviceupdate;
import com.azure.core.annotation.Generated;
@@ -12,19 +11,33 @@
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
+import com.azure.core.util.FluxUtil;
import com.azure.core.util.polling.PollerFlux;
-import com.azure.iot.deviceupdate.implementation.DeviceUpdatesImpl;
+import com.azure.iot.deviceupdate.implementation.DeviceUpdateClientImpl;
+import com.azure.iot.deviceupdate.models.ImportUpdateInputItem;
+import com.azure.iot.deviceupdate.models.Update;
+import com.azure.iot.deviceupdate.models.UpdateFile;
+import com.azure.iot.deviceupdate.models.UpdateOperation;
+import java.util.List;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/** Initializes a new instance of the asynchronous DeviceUpdateClient type. */
+/**
+ * Initializes a new instance of the asynchronous DeviceUpdateClient type.
+ */
@ServiceClient(builder = DeviceUpdateClientBuilder.class, isAsync = true)
public final class DeviceUpdateAsyncClient {
+
@Generated
- private final DeviceUpdatesImpl serviceClient;
+ private final DeviceUpdateClientImpl serviceClient;
/**
* Initializes an instance of DeviceUpdateAsyncClient class.
@@ -32,72 +45,70 @@ public final class DeviceUpdateAsyncClient {
* @param serviceClient the service client implementation.
*/
@Generated
- DeviceUpdateAsyncClient(DeviceUpdatesImpl serviceClient) {
+ DeviceUpdateAsyncClient(DeviceUpdateClientImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
* Get a list of all updates that have been imported to Device Update for IoT Hub.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | search | String | No | Request updates matching a free-text search expression. |
- * | filter | String | No | Optional to filter updates by isDeployable property. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | search | String | No | Request updates matching a free-text search
+ * expression. |
+ * | filter | String | No | Optional to filter updates by isDeployable property. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
+ * }
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * isDeployable: Boolean (Optional)
+ * updateType: String (Optional)
+ * installedCriteria: String (Optional)
+ * compatibility (Required): [
* (Required){
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
+ * (Optional): {
+ * String: String (Required)
* }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * isDeployable: Boolean (Optional)
- * updateType: String (Optional)
- * installedCriteria: String (Optional)
- * compatibility (Required): [
- * (Required){
- * String: String (Required)
+ * }
+ * ]
+ * instructions (Optional): {
+ * steps (Required): [
+ * (Required){
+ * type: String(inline/reference) (Optional)
+ * description: String (Optional)
+ * handler: String (Optional)
+ * handlerProperties (Optional): {
+ * String: BinaryData (Required)
* }
- * ]
- * instructions (Optional): {
- * steps (Required): [
- * (Required){
- * type: String(Inline/Reference) (Optional)
- * description: String (Optional)
- * handler: String (Optional)
- * handlerProperties: Object (Optional)
- * files (Optional): [
- * String (Optional)
- * ]
- * updateId (Optional): (recursive schema, see updateId above)
- * }
+ * files (Optional): [
+ * String (Optional)
* ]
+ * updateId (Optional): (recursive schema, see updateId above)
* }
- * referencedBy (Optional): [
- * (recursive schema, see above)
- * ]
- * scanResult: String (Optional)
- * manifestVersion: String (Required)
- * importedDateTime: OffsetDateTime (Required)
- * createdDateTime: OffsetDateTime (Required)
- * etag: String (Optional)
- * }
+ * ]
+ * }
+ * referencedBy (Optional): [
+ * (recursive schema, see above)
* ]
- * nextLink: String (Optional)
+ * scanResult: String (Optional)
+ * manifestVersion: String (Required)
+ * importedDateTime: OffsetDateTime (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * etag: String (Optional)
+ * }
* }
- * }
+ *
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -105,7 +116,7 @@ public final class DeviceUpdateAsyncClient {
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with
- * {@link PagedFlux}.
+ * {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -114,12 +125,12 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
}
/**
- * Import new update version. This is a long-running-operation; use Operation-Location response header value to
- * check for operation status.
- *
- * Request Body Schema
- *
- *
{@code
+ * Import new update version. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
+ * Request Body Schema
+ *
+ *
+ * {@code
* [
* (Required){
* importManifest (Required): {
@@ -138,11 +149,13 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
* ]
* }
* ]
- * }
- *
- * Response Body Schema
- *
- *
{@code
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* updateId (Required): {
* provider: String (Required)
@@ -156,16 +169,20 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
* installedCriteria: String (Optional)
* compatibility (Required): [
* (Required){
- * String: String (Required)
+ * (Optional): {
+ * String: String (Required)
+ * }
* }
* ]
* instructions (Optional): {
* steps (Required): [
* (Required){
- * type: String(Inline/Reference) (Optional)
+ * type: String(inline/reference) (Optional)
* description: String (Optional)
* handler: String (Optional)
- * handlerProperties: Object (Optional)
+ * handlerProperties (Optional): {
+ * String: BinaryData (Required)
+ * }
* files (Optional): [
* String (Optional)
* ]
@@ -182,10 +199,12 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
* createdDateTime: OffsetDateTime (Required)
* etag: String (Optional)
* }
- * }
+ * }
+ *
*
* @param updateToImport The update to be imported (see schema
- * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details).
+ * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for
+ * details).
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -202,20 +221,19 @@ public PollerFlux beginImportUpdate(BinaryData updateToI
/**
* Get a specific update version.
- *
- * Header Parameters
- *
+ *
Header Parameters
*
- * Header Parameters
- * | Name | Type | Required | Description |
- * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will
+ * be performed only if
+ * the ETag on the server does not match this value. |
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* updateId (Required): {
* provider: String (Required)
@@ -229,16 +247,20 @@ public PollerFlux beginImportUpdate(BinaryData updateToI
* installedCriteria: String (Optional)
* compatibility (Required): [
* (Required){
- * String: String (Required)
+ * (Optional): {
+ * String: String (Required)
+ * }
* }
* ]
* instructions (Optional): {
* steps (Required): [
* (Required){
- * type: String(Inline/Reference) (Optional)
+ * type: String(inline/reference) (Optional)
* description: String (Optional)
* handler: String (Optional)
- * handlerProperties: Object (Optional)
+ * handlerProperties (Optional): {
+ * String: BinaryData (Required)
+ * }
* files (Optional): [
* String (Optional)
* ]
@@ -255,7 +277,8 @@ public PollerFlux beginImportUpdate(BinaryData updateToI
* createdDateTime: OffsetDateTime (Required)
* etag: String (Optional)
* }
- * }
+ * }
+ *
*
* @param provider Update provider.
* @param name Update name.
@@ -275,8 +298,8 @@ public Mono> getUpdateWithResponse(String provider, String
}
/**
- * Delete a specific update version. This is a long-running-operation; use Operation-Location response header value
- * to check for operation status.
+ * Delete a specific update version. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
*
* @param provider Update provider.
* @param name Update name.
@@ -296,26 +319,23 @@ public PollerFlux beginDeleteUpdate(String provider, Str
}
/**
- * Get a list of all update providers that have been imported to Device Update for IoT Hub.
- *
- * Response Body Schema
- *
- *
{@code
- * {
- * value (Required): [
- * String (Required)
- * ]
- * nextLink: String (Optional)
+ * Get a list of all update providers that have been imported to Device Update for
+ * IoT Hub.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * String
* }
- * }
+ *
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of all update providers that have been imported to Device Update for IoT Hub as paginated response
- * with {@link PagedFlux}.
+ * @return a list of all update providers that have been imported to Device Update for
+ * IoT Hub as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -325,17 +345,13 @@ public PagedFlux listProviders(RequestOptions requestOptions) {
/**
* Get a list of all update names that match the specified provider.
- *
- * Response Body Schema
- *
- *
{@code
- * {
- * value (Required): [
- * String (Required)
- * ]
- * nextLink: String (Optional)
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * String
* }
- * }
+ *
*
* @param provider Update provider.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -343,8 +359,8 @@ public PagedFlux listProviders(RequestOptions requestOptions) {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of all update names that match the specified provider as paginated response with {@link
- * PagedFlux}.
+ * @return a list of all update names that match the specified provider as paginated response with
+ * {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -354,27 +370,20 @@ public PagedFlux listNames(String provider, RequestOptions requestOp
/**
* Get a list of all update versions that match the specified provider and name.
- *
- * Query Parameters
- *
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Optional to filter updates by isDeployable property. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Optional to filter updates by isDeployable property. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
- * {
- * value (Required): [
- * String (Required)
- * ]
- * nextLink: String (Optional)
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * String
* }
- * }
+ *
*
* @param provider Update provider.
* @param name Update name.
@@ -384,7 +393,7 @@ public PagedFlux listNames(String provider, RequestOptions requestOp
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return a list of all update versions that match the specified provider and name as paginated response with
- * {@link PagedFlux}.
+ * {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -394,17 +403,13 @@ public PagedFlux listVersions(String provider, String name, RequestO
/**
* Get a list of all update file identifiers for the specified version.
- *
- * Response Body Schema
- *
- *
{@code
- * {
- * value (Required): [
- * String (Required)
- * ]
- * nextLink: String (Optional)
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * String
* }
- * }
+ *
*
* @param provider Update provider.
* @param name Update name.
@@ -414,8 +419,8 @@ public PagedFlux listVersions(String provider, String name, RequestO
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a list of all update file identifiers for the specified version as paginated response with {@link
- * PagedFlux}.
+ * @return a list of all update file identifiers for the specified version as paginated response with
+ * {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -426,20 +431,19 @@ public PagedFlux listFiles(String provider, String name, String vers
/**
* Get a specific update file from the version.
- *
- * Header Parameters
- *
+ *
Header Parameters
*
- * Header Parameters
- * | Name | Type | Required | Description |
- * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will
+ * be performed only if
+ * the ETag on the server does not match this value. |
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* fileName: String (Required)
* sizeInBytes: long (Required)
@@ -450,7 +454,7 @@ public PagedFlux listFiles(String provider, String name, String vers
* scanResult: String (Optional)
* scanDetails: String (Optional)
* properties (Optional): {
- * String: String (Optional)
+ * String: String (Required)
* }
* fileId: String (Required)
* relatedFiles (Optional): [
@@ -464,7 +468,7 @@ public PagedFlux listFiles(String provider, String name, String vers
* scanResult: String (Optional)
* scanDetails: String (Optional)
* properties (Optional): {
- * String: String (Optional)
+ * String: String (Required)
* }
* }
* ]
@@ -473,7 +477,8 @@ public PagedFlux listFiles(String provider, String name, String vers
* }
* etag: String (Optional)
* }
- * }
+ * }
+ *
*
* @param provider Update provider.
* @param name Update name.
@@ -484,8 +489,8 @@ public PagedFlux listFiles(String provider, String name, String vers
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a specific update file from the version along with {@link Response} on successful completion of {@link
- * Mono}.
+ * @return a specific update file from the version along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -495,62 +500,61 @@ public Mono> getFileWithResponse(String provider, String na
}
/**
- * Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete
- * operations are not returned by this API version.
- *
- * Query Parameters
- *
+ * Get a list of all import update operations. Completed operations are kept for 7
+ * days before auto-deleted. Delete operations are not returned by this API
+ * version.
+ *
Query Parameters
*
- * Query Parameters
- * | Name | Type | Required | Description |
- * | filter | String | No | Optional to filter operations by status property. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
- * | top | Integer | No | Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. |
+ * Query Parameters
+ * | Name | Type | Required | Description |
+ * | filter | String | No | Optional to filter operations by status property. Only one
+ * specific filter is
+ * supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * | top | Integer | No | Specifies a non-negative integer n that limits the number of items
+ * returned
+ * from a collection. The service returns the number of available items up to but
+ * not greater than the specified value n. |
*
- *
* You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
- * value (Required): [
- * (Required){
- * operationId: String (Required)
- * status: String(NotStarted/Running/Succeeded/Failed) (Required)
- * update (Optional): {
- * updateId (Required): {
- * provider: String (Required)
- * name: String (Required)
- * version: String (Required)
- * }
- * description: String (Optional)
- * friendlyName: String (Optional)
- * }
- * resourceLocation: String (Optional)
- * error (Optional): {
- * code: String (Required)
- * message: String (Required)
- * target: String (Optional)
- * details (Optional): [
- * (recursive schema, see above)
- * ]
- * innererror (Optional): {
- * code: String (Required)
- * message: String (Optional)
- * errorDetail: String (Optional)
- * innerError (Optional): (recursive schema, see innerError above)
- * }
- * occurredDateTime: OffsetDateTime (Optional)
- * }
- * traceId: String (Optional)
- * lastActionDateTime: OffsetDateTime (Required)
- * createdDateTime: OffsetDateTime (Required)
- * etag: String (Optional)
+ * operationId: String (Required)
+ * status: String(NotStarted/Running/Succeeded/Failed) (Required)
+ * update (Optional): {
+ * updateId (Required): {
+ * provider: String (Required)
+ * name: String (Required)
+ * version: String (Required)
* }
- * ]
- * nextLink: String (Optional)
+ * description: String (Optional)
+ * friendlyName: String (Optional)
+ * }
+ * resourceLocation: String (Optional)
+ * error (Optional): {
+ * code: String (Required)
+ * message: String (Required)
+ * target: String (Optional)
+ * details (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * innererror (Optional): {
+ * code: String (Required)
+ * message: String (Optional)
+ * errorDetail: String (Optional)
+ * innerError (Optional): (recursive schema, see innerError above)
+ * }
+ * occurredDateTime: OffsetDateTime (Optional)
+ * }
+ * traceId: String (Optional)
+ * lastActionDateTime: OffsetDateTime (Required)
+ * createdDateTime: OffsetDateTime (Required)
+ * etag: String (Optional)
* }
- * }
+ * }
+ *
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -567,20 +571,19 @@ public PagedFlux listOperationStatuses(RequestOptions requestOptions
/**
* Retrieve operation status.
- *
- * Header Parameters
- *
+ *
Header Parameters
*
- * Header Parameters
- * | Name | Type | Required | Description |
- * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. |
+ * Header Parameters
+ * | Name | Type | Required | Description |
+ * | If-None-Match | String | No | Defines the If-None-Match condition. The operation will
+ * be performed only if
+ * the ETag on the server does not match this value. |
*
- *
* You can add these to a request with {@link RequestOptions#addHeader}
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* operationId: String (Required)
* status: String(NotStarted/Running/Succeeded/Failed) (Required)
@@ -614,7 +617,8 @@ public PagedFlux listOperationStatuses(RequestOptions requestOptions
* createdDateTime: OffsetDateTime (Required)
* etag: String (Optional)
* }
- * }
+ * }
+ *
*
* @param operationId Operation identifier.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -630,4 +634,520 @@ public Mono> getOperationStatusWithResponse(String operatio
RequestOptions requestOptions) {
return this.serviceClient.getOperationStatusWithResponseAsync(operationId, requestOptions);
}
+
+ /**
+ * Get a list of all updates that have been imported to Device Update for IoT Hub.
+ *
+ * @param search Request updates matching a free-text search expression.
+ * @param filter Optional to filter updates by isDeployable property.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listUpdates(String search, String filter) {
+ // Generated convenience method for listUpdates
+ RequestOptions requestOptions = new RequestOptions();
+ if (search != null) {
+ requestOptions.addQueryParam("search", search, false);
+ }
+ if (filter != null) {
+ requestOptions.addQueryParam("filter", filter, false);
+ }
+ PagedFlux pagedFluxResponse = listUpdates(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Update.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Get a list of all updates that have been imported to Device Update for IoT Hub.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of all updates that have been imported to Device Update for IoT Hub as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listUpdates() {
+ // Generated convenience method for listUpdates
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listUpdates(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Update.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Import new update version. This is a long-running-operation; use
+ * Operation-Location response header value to check for operation status.
+ *
+ * @param updateToImport The update to be imported (see schema
+ * https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for
+ * details).
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of update metadata.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux