diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md b/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
index e429c29ed32c..d1f52e69fb50 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
@@ -1,14 +1,23 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.1.0-beta.1 (2026-06-15)
+
+This release is the first preview of the rewritten Device Update for IoT Hub client library generated from
+TypeSpec. It targets API version `2026-06-01`.
### Features Added
-### Breaking Changes
+- Added `DeviceManagementClient` (and `DeviceManagementAsyncClient`) for device, group, deployment and
+ diagnostics operations, plus `DeviceManagementClientBuilder`.
+- `DeviceUpdateClient` (and `DeviceUpdateAsyncClient`) now expose strongly-typed models in addition to the
+ existing low-level `BinaryData` / `RequestOptions` overloads.
-### Bugs Fixed
+### Breaking Changes
-### Other Changes
+- `DeviceUpdateClientBuilder.buildClient()` and `buildAsyncClient()` were removed. Use
+ `buildDeviceUpdateClient()` / `buildDeviceUpdateAsyncClient()` for the update catalog, and the new
+ `DeviceManagementClientBuilder` (or `DeviceUpdateClientBuilder.buildDeviceManagementClient()` /
+ `buildDeviceManagementAsyncClient()`) for device management.
## 1.0.33 (2026-05-05)
@@ -372,4 +381,4 @@ This is a new version of client SDK. Changes are:
This is the initial release of Azure Device Update for IoT Hub library. For more information, please see the [README](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/deviceupdate/azure-iot-deviceupdate/README.md)
and [samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/deviceupdate/azure-iot-deviceupdate/src/samples/README.md).
-This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for Java GitHub repo](https://github.com/Azure/azure-sdk-for-java/issues).
+This is a Public Preview version, so breaking changes are possible in subsequent releases as we improve the product. To provide feedback, please submit an issue in our [Azure SDK for Java GitHub repo](https://github.com/Azure/azure-sdk-for-java/issues).
\ No newline at end of file
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..0ad7e10966ad 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,23 +12,49 @@
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.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. */
-@ServiceClient(builder = DeviceManagementClientBuilder.class, isAsync = true)
+/**
+ * Initializes a new instance of the asynchronous DeviceUpdateClient type.
+ */
+@ServiceClient(builder = DeviceUpdateClientBuilder.class, isAsync = true)
public final class DeviceManagementAsyncClient {
@Generated
private final DeviceManagementsImpl serviceClient;
/**
* Initializes an instance of DeviceManagementAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
@@ -37,60 +63,56 @@ public final class DeviceManagementAsyncClient {
}
/**
- * 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.
@@ -869,31 +898,12 @@ 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.
- * @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 {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> deleteDeploymentWithResponse(String groupId, String deploymentId,
- RequestOptions requestOptions) {
- return this.serviceClient.deleteDeploymentWithResponseAsync(groupId, deploymentId, requestOptions);
- }
-
- /**
- * 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 +936,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 +946,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 +958,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 +1000,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 +1014,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 +1034,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 +1060,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 +1083,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 +1096,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 +1116,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 +1126,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 +1139,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 +1200,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 +1230,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.
@@ -1238,33 +1253,12 @@ public Mono> getDeploymentForDeviceClassSubgroupWithRespons
deploymentId, requestOptions);
}
- /**
- * Deletes a device class subgroup deployment.
- *
- * @param groupId Group identifier.
- * @param deviceClassId Device class identifier.
- * @param deploymentId Deployment 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 {@link Response} on successful completion of {@link Mono}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId,
- String deploymentId, RequestOptions requestOptions) {
- return this.serviceClient.deleteDeploymentForDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId,
- deploymentId, requestOptions);
- }
-
/**
* Stops a deployment.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1291,9 +1285,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 +1309,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 +1339,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 +1363,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 +1394,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 +1405,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 +1418,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 +1463,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 +1499,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 +1518,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 +1578,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 +1595,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 +1615,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 +1636,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 +1653,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 +1674,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 +1709,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 +1730,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 +1750,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 +1783,1428 @@ public Mono> getLogCollectionDetailedStatusWithResponse(Str
public PagedFlux listHealthOfDevices(String filter, RequestOptions requestOptions) {
return this.serviceClient.listHealthOfDevicesAsync(filter, requestOptions);
}
+
+ /**
+ * 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.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteDeploymentWithResponse(String groupId, String deploymentId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteDeploymentWithResponseAsync(groupId, deploymentId, requestOptions);
+ }
+
+ /**
+ * Deletes a device class subgroup deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment 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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId,
+ String deploymentId, RequestOptions requestOptions) {
+ return this.serviceClient.deleteDeploymentForDeviceClassSubgroupWithResponseAsync(groupId, deviceClassId,
+ deploymentId, 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));
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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));
+ });
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * 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);
+ }
}
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..0562d926474f 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,22 +12,43 @@
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.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. */
-@ServiceClient(builder = DeviceManagementClientBuilder.class)
+/**
+ * Initializes a new instance of the synchronous DeviceUpdateClient type.
+ */
+@ServiceClient(builder = DeviceUpdateClientBuilder.class)
public final class DeviceManagementClient {
@Generated
private final DeviceManagementsImpl serviceClient;
/**
* Initializes an instance of DeviceManagementClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
@@ -36,60 +57,56 @@ public final class DeviceManagementClient {
}
/**
- * 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.
@@ -867,31 +890,12 @@ 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.
- * @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 {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteDeploymentWithResponse(String groupId, String deploymentId,
- RequestOptions requestOptions) {
- return this.serviceClient.deleteDeploymentWithResponse(groupId, deploymentId, requestOptions);
- }
-
- /**
- * 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 +928,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 +938,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 +949,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 +991,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 +1005,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 +1025,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 +1051,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 +1074,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 +1087,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 +1107,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 +1117,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 +1130,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 +1191,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 +1221,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.
@@ -1236,33 +1244,12 @@ public Response getDeploymentForDeviceClassSubgroupWithResponse(Stri
requestOptions);
}
- /**
- * Deletes a device class subgroup deployment.
- *
- * @param groupId Group identifier.
- * @param deviceClassId Device class identifier.
- * @param deploymentId Deployment 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 {@link Response}.
- */
- @Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId,
- String deploymentId, RequestOptions requestOptions) {
- return this.serviceClient.deleteDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId,
- deploymentId, requestOptions);
- }
-
/**
* Stops a deployment.
- *
- * Response Body Schema
- *
- *
{@code
+ * Response Body Schema
+ *
+ *
+ * {@code
* {
* deploymentId: String (Required)
* startDateTime: OffsetDateTime (Required)
@@ -1289,9 +1276,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 +1300,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 +1330,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 +1353,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 +1384,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 +1395,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 +1407,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 +1440,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 +1453,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 +1489,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 +1507,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 +1567,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 +1584,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 +1604,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 +1625,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 +1642,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 +1661,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 +1696,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 +1717,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 +1737,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 +1770,1180 @@ public Response getLogCollectionDetailedStatusWithResponse(String lo
public PagedIterable listHealthOfDevices(String filter, RequestOptions requestOptions) {
return this.serviceClient.listHealthOfDevices(filter, requestOptions);
}
+
+ /**
+ * 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.
+ * @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 {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteDeploymentWithResponse(String groupId, String deploymentId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteDeploymentWithResponse(groupId, deploymentId, requestOptions);
+ }
+
+ /**
+ * Deletes a device class subgroup deployment.
+ *
+ * @param groupId Group identifier.
+ * @param deviceClassId Device class identifier.
+ * @param deploymentId Deployment 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 {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteDeploymentForDeviceClassSubgroupWithResponse(String groupId, String deviceClassId,
+ String deploymentId, RequestOptions requestOptions) {
+ return this.serviceClient.deleteDeploymentForDeviceClassSubgroupWithResponse(groupId, deviceClassId,
+ deploymentId, 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);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * 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));
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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();
+ }
}
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..b1b68c206d21 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,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,15 +12,28 @@
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.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
@@ -28,7 +41,7 @@ public final class DeviceUpdateAsyncClient {
/**
* Initializes an instance of DeviceUpdateAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
@@ -38,74 +51,72 @@ public final class DeviceUpdateAsyncClient {
/**
* 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.
* @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 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,8 +277,9 @@ public PollerFlux beginImportUpdate(BinaryData updateToI
* createdDateTime: OffsetDateTime (Required)
* etag: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param provider Update provider.
* @param name Update name.
* @param version Update version.
@@ -275,9 +298,9 @@ 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.
* @param version Update version.
@@ -290,32 +313,29 @@ public Mono> getUpdateWithResponse(String provider, String
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public PollerFlux beginDeleteUpdate(String provider, String name, String version,
+ public PollerFlux beginDeleteUpdate(String provider, String name, String version,
RequestOptions requestOptions) {
return this.serviceClient.beginDeleteUpdateAsync(provider, name, version, requestOptions);
}
/**
- * 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,26 +345,22 @@ 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.
* @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 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,28 +370,21 @@ 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.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -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,18 +403,14 @@ 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.
* @param version Update version.
@@ -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,8 +477,9 @@ public PagedFlux listFiles(String provider, String name, String vers
* }
* etag: String (Optional)
* }
- * }
- *
+ * }
+ *
+ *
* @param provider Update provider.
* @param name Update name.
* @param version Update version.
@@ -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,63 +500,62 @@ 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.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -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,8 +617,9 @@ 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.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -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 beginImportUpdate(List updateToImport) {
+ // Generated convenience method for beginImportUpdateWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginImportUpdateWithModelAsync(BinaryData.fromObject(updateToImport), requestOptions);
+ }
+
+ /**
+ * Get a specific update version.
+ *
+ * @param provider Update provider.
+ * @param name Update name.
+ * @param version Update version.
+ * @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 a specific update version on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUpdate(String provider, String name, String version, String ifNoneMatch) {
+ // Generated convenience method for getUpdateWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (ifNoneMatch != null) {
+ requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch);
+ }
+ return getUpdateWithResponse(provider, name, version, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Update.class));
+ }
+
+ /**
+ * Get a specific update version.
+ *
+ * @param provider Update provider.
+ * @param name Update name.
+ * @param version Update version.
+ * @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 specific update version on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUpdate(String provider, String name, String version) {
+ // Generated convenience method for getUpdateWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUpdateWithResponse(provider, name, version, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Update.class));
+ }
+
+ /**
+ * 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.
+ * @param version Update version.
+ * @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 beginDeleteUpdate(String provider, String name, String version) {
+ // Generated convenience method for beginDeleteUpdateWithModel
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.beginDeleteUpdateWithModelAsync(provider, name, version, requestOptions);
+ }
+
+ /**
+ * Get a list of all update providers 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 update providers that have been imported to Device Update for
+ * IoT Hub as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux