diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md b/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
index 8589e34d793e4..16d1503a0decb 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
@@ -6,6 +6,9 @@
### Breaking Changes
+- Added `DeviceManagementClientBuilder` to create `DeviceManagementClient` instance via `DeviceManagementClientBuilder.buildClient()`.
+- Modified `DeviceUpdateClientBuilder` to create `DeviceUpdateClient` instance via `DeviceUpdateClientBuilder.buildClient()`.
+
### Bugs Fixed
### Other Changes
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 a721bb14056bd..a176a20f62cdd 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
@@ -8,7 +8,10 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
@@ -18,7 +21,7 @@
import reactor.core.publisher.Mono;
/** Initializes a new instance of the asynchronous DeviceUpdateClient type. */
-@ServiceClient(builder = DeviceUpdateClientBuilder.class, isAsync = true)
+@ServiceClient(builder = DeviceManagementClientBuilder.class, isAsync = true)
public final class DeviceManagementAsyncClient {
@Generated private final DeviceManagementsImpl serviceClient;
@@ -41,7 +44,7 @@ public final class DeviceManagementAsyncClient {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -67,8 +70,11 @@ public final class DeviceManagementAsyncClient {
*
* @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 (unique combinations of device manufacturer and model) for all devices
- * connected to Device Update for IoT Hub.
+ * connected to Device Update for IoT Hub as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -84,7 +90,7 @@ public PagedFlux listDeviceClasses(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -106,6 +112,9 @@ public PagedFlux listDeviceClasses(RequestOptions requestOptions) {
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 properties of a device class along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -122,7 +131,7 @@ public Mono> getDeviceClassWithResponse(String deviceClassI
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -143,7 +152,10 @@ public Mono> getDeviceClassWithResponse(String deviceClassI
* @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.
- * @return a list of installable updates for a device class.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 installable updates for a device class as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -160,8 +172,8 @@ public PagedFlux listInstallableUpdatesForDeviceClass(
*
* Query Parameters
* Name | Type | Required | Description |
- * filter | String | No | Restricts the set of devices returned. You can filter on device GroupId or DeviceClassId. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of devices returned. You can filter on device GroupId or DeviceClassId. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -207,7 +219,10 @@ public PagedFlux listInstallableUpdatesForDeviceClass(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of devices connected to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -223,7 +238,7 @@ public PagedFlux listDevices(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
* action | String | Yes | Devices action. |
*
*
@@ -236,6 +251,9 @@ public PagedFlux listDevices(RequestOptions requestOptions) {
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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
@@ -252,7 +270,7 @@ public Mono> importDevicesWithResponse(BinaryData importType, Req
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
* action | String | Yes | Devices action. |
*
*
@@ -265,7 +283,10 @@ public Mono> importDevicesWithResponse(BinaryData importType, Req
* @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.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PollerFlux} for polling of long-running operation.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
@@ -281,7 +302,7 @@ public PollerFlux beginImportDevices(BinaryData importTy
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -323,6 +344,9 @@ 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}.
*/
@@ -341,7 +365,7 @@ public Mono> getDeviceWithResponse(String deviceId, Request
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -384,6 +408,9 @@ public Mono> getDeviceWithResponse(String deviceId, Request
* @param moduleId Device module 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 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}.
*/
@@ -403,7 +430,7 @@ public Mono> getDeviceModuleWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -419,6 +446,9 @@ public Mono> getDeviceModuleWithResponse(
*
* @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}.
*/
@@ -436,7 +466,7 @@ public Mono> getUpdateComplianceWithResponse(RequestOptions
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -455,7 +485,11 @@ public Mono> getUpdateComplianceWithResponse(RequestOptions
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of available group device tags for all devices connected to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 available group device tags for all devices connected to Device Update for IoT Hub as paginated
+ * response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -471,7 +505,7 @@ public PagedFlux listDeviceTags(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -486,6 +520,9 @@ public PagedFlux listDeviceTags(RequestOptions requestOptions) {
* @param tagName Tag name.
* @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 count of how many devices have a device tag along with {@link Response} on successful completion of
* {@link Mono}.
*/
@@ -503,7 +540,7 @@ public Mono> getDeviceTagWithResponse(String tagName, Reque
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -529,7 +566,10 @@ public Mono> getDeviceTagWithResponse(String tagName, Reque
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all device groups.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 groups as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -545,7 +585,7 @@ public PagedFlux listGroups(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -567,6 +607,9 @@ public PagedFlux listGroups(RequestOptions requestOptions) {
* @param groupId Group identity.
* @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 properties of a group along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -583,7 +626,7 @@ public Mono> getGroupWithResponse(String groupId, RequestOp
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -622,6 +665,9 @@ public Mono> getGroupWithResponse(String groupId, RequestOp
* @param group The group properties.
* @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 group details along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -639,12 +685,15 @@ public Mono> createOrUpdateGroupWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param groupId Group identity.
* @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
@@ -662,7 +711,7 @@ public Mono> deleteGroupWithResponse(String groupId, RequestOptio
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -679,6 +728,9 @@ public Mono> deleteGroupWithResponse(String groupId, RequestOptio
* @param groupId Group identity.
* @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 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}.
@@ -698,8 +750,8 @@ public Mono> getGroupUpdateComplianceWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * filter | String | No | Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -723,7 +775,11 @@ public Mono> getGroupUpdateComplianceWithResponse(
* @param groupId Group identity.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return the best available updates for a group and a count of how many devices need each update.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 group and a count of how many devices need each update as paginated
+ * response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -739,8 +795,8 @@ public PagedFlux listBestUpdatesForGroup(String groupId, RequestOpti
*
* Query Parameters
* Name | Type | Required | Description |
- * filter | String | No | Restricts the set of deployments returned. You can filter on update Provider, Name and Version property. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of deployments returned. You can filter on update Provider, Name and Version property. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -768,7 +824,10 @@ public PagedFlux listBestUpdatesForGroup(String groupId, RequestOpti
* @param groupId Group identity.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of deployments for a group.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 deployments for a group as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -784,7 +843,7 @@ public PagedFlux listDeploymentsForGroup(String groupId, RequestOpti
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -808,6 +867,9 @@ public PagedFlux listDeploymentsForGroup(String groupId, RequestOpti
* @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 properties of a deployment along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -825,7 +887,7 @@ public Mono> getDeploymentWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -867,6 +929,9 @@ public Mono> getDeploymentWithResponse(
* @param deployment The deployment properties.
* @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 deployment metadata along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -885,13 +950,16 @@ public Mono> createOrUpdateDeploymentWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param groupId Group identity.
* @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
@@ -910,7 +978,7 @@ public Mono> deleteDeploymentWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -930,6 +998,9 @@ public Mono> deleteDeploymentWithResponse(
* @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 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}.
*/
@@ -948,8 +1019,8 @@ public Mono> getDeploymentStatusWithResponse(
*
* 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. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -973,7 +1044,10 @@ public Mono> getDeploymentStatusWithResponse(
* @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.
- * @return a list of devices in a deployment along with their state.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -990,7 +1064,7 @@ public PagedFlux listDeploymentDevices(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -998,7 +1072,7 @@ public PagedFlux listDeploymentDevices(
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -1032,6 +1106,9 @@ public PagedFlux listDeploymentDevices(
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 operation metadata along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -1048,9 +1125,9 @@ public Mono> getOperationWithResponse(String operationId, R
*
* 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 | String | 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. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * $top | String | 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. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1088,7 +1165,10 @@ public Mono> getOperationWithResponse(String operationId, R
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all device import operations.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 import operations as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -1104,7 +1184,7 @@ public PagedFlux listOperations(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -1147,6 +1227,9 @@ public PagedFlux listOperations(RequestOptions requestOptions) {
* @param logCollectionRequest The deployment properties.
* @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 diagnostics request body along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -1164,7 +1247,7 @@ public Mono> collectLogsWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1188,6 +1271,9 @@ public Mono> collectLogsWithResponse(
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 operation along with {@link Response} on successful completion of
* {@link Mono}.
*/
@@ -1206,7 +1292,7 @@ public Mono> getLogCollectionOperationWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1234,7 +1320,10 @@ public Mono> getLogCollectionOperationWithResponse(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return all device diagnostics log collection operations.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 all device diagnostics log collection operations as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -1250,7 +1339,7 @@ public PagedFlux listLogCollectionOperations(RequestOptions requestO
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1278,6 +1367,9 @@ public PagedFlux listLogCollectionOperations(RequestOptions requestO
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 diagnostics log collection operation with detailed status along with {@link Response} on
* successful completion of {@link Mono}.
*/
@@ -1297,7 +1389,7 @@ public Mono> getLogCollectionOperationDetailedStatusWithRes
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Cancel deployment action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1321,6 +1413,9 @@ public Mono> getLogCollectionOperationDetailedStatusWithRes
* @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 deployment metadata along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -1339,7 +1434,7 @@ public Mono> stopDeploymentWithResponse(
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Retry deployment action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1363,6 +1458,9 @@ public Mono> stopDeploymentWithResponse(
* @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 deployment metadata along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
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 6eb895a329232..bd30705bfc386 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
@@ -8,17 +8,19 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
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 reactor.core.publisher.Mono;
/** Initializes a new instance of the synchronous DeviceUpdateClient type. */
-@ServiceClient(builder = DeviceUpdateClientBuilder.class)
+@ServiceClient(builder = DeviceManagementClientBuilder.class)
public final class DeviceManagementClient {
@Generated private final DeviceManagementsImpl serviceClient;
@@ -41,7 +43,7 @@ public final class DeviceManagementClient {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -67,8 +69,11 @@ public final class DeviceManagementClient {
*
* @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 (unique combinations of device manufacturer and model) for all devices
- * connected to Device Update for IoT Hub.
+ * connected to Device Update for IoT Hub as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -84,7 +89,7 @@ public PagedIterable listDeviceClasses(RequestOptions requestOptions
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -106,6 +111,9 @@ public PagedIterable listDeviceClasses(RequestOptions requestOptions
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 properties of a device class along with {@link Response}.
*/
@Generated
@@ -122,7 +130,7 @@ public Response getDeviceClassWithResponse(String deviceClassId, Req
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -143,7 +151,10 @@ public Response getDeviceClassWithResponse(String deviceClassId, Req
* @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.
- * @return a list of installable updates for a device class.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 installable updates for a device class as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -160,8 +171,8 @@ public PagedIterable listInstallableUpdatesForDeviceClass(
*
* Query Parameters
* Name | Type | Required | Description |
- * filter | String | No | Restricts the set of devices returned. You can filter on device GroupId or DeviceClassId. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of devices returned. You can filter on device GroupId or DeviceClassId. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -207,7 +218,11 @@ public PagedIterable listInstallableUpdatesForDeviceClass(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of devices connected to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -223,7 +238,7 @@ public PagedIterable listDevices(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
* action | String | Yes | Devices action. |
*
*
@@ -236,7 +251,10 @@ public PagedIterable listDevices(RequestOptions requestOptions) {
* @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.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 SyncPoller} for polling of long-running operation.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
@@ -252,7 +270,7 @@ public SyncPoller beginImportDevices(BinaryData importTy
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -294,6 +312,9 @@ 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}.
*/
@@ -312,7 +333,7 @@ public Response getDeviceWithResponse(String deviceId, RequestOption
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -355,6 +376,9 @@ public Response getDeviceWithResponse(String deviceId, RequestOption
* @param moduleId Device module 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 module properties and latest deployment status for a device module connected to Device Update
* for IoT Hub along with {@link Response}.
*/
@@ -374,7 +398,7 @@ public Response getDeviceModuleWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -390,6 +414,9 @@ public Response getDeviceModuleWithResponse(
*
* @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}.
*/
@@ -407,7 +434,7 @@ public Response getUpdateComplianceWithResponse(RequestOptions reque
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -426,7 +453,11 @@ public Response getUpdateComplianceWithResponse(RequestOptions reque
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of available group device tags for all devices connected to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 available group device tags for all devices connected to Device Update for IoT Hub as paginated
+ * response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -442,7 +473,7 @@ public PagedIterable listDeviceTags(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -457,6 +488,9 @@ public PagedIterable listDeviceTags(RequestOptions requestOptions) {
* @param tagName Tag name.
* @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 count of how many devices have a device tag along with {@link Response}.
*/
@Generated
@@ -473,7 +507,7 @@ public Response getDeviceTagWithResponse(String tagName, RequestOpti
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -499,7 +533,10 @@ public Response getDeviceTagWithResponse(String tagName, RequestOpti
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all device groups.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 groups as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -515,7 +552,7 @@ public PagedIterable listGroups(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -537,6 +574,9 @@ public PagedIterable listGroups(RequestOptions requestOptions) {
* @param groupId Group identity.
* @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 properties of a group along with {@link Response}.
*/
@Generated
@@ -553,7 +593,7 @@ public Response getGroupWithResponse(String groupId, RequestOptions
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -592,6 +632,9 @@ public Response getGroupWithResponse(String groupId, RequestOptions
* @param group The group properties.
* @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 group details along with {@link Response}.
*/
@Generated
@@ -609,12 +652,15 @@ public Response createOrUpdateGroupWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param groupId Group identity.
* @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
@@ -632,7 +678,7 @@ public Response deleteGroupWithResponse(String groupId, RequestOptions req
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -649,6 +695,9 @@ public Response deleteGroupWithResponse(String groupId, RequestOptions req
* @param groupId Group identity.
* @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 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}.
*/
@@ -666,8 +715,8 @@ public Response getGroupUpdateComplianceWithResponse(String groupId,
*
* Query Parameters
* Name | Type | Required | Description |
- * filter | String | No | Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -691,7 +740,11 @@ public Response getGroupUpdateComplianceWithResponse(String groupId,
* @param groupId Group identity.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return the best available updates for a group and a count of how many devices need each update.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 group and a count of how many devices need each update as paginated
+ * response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -707,8 +760,8 @@ public PagedIterable listBestUpdatesForGroup(String groupId, Request
*
* Query Parameters
* Name | Type | Required | Description |
- * filter | String | No | Restricts the set of deployments returned. You can filter on update Provider, Name and Version property. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of deployments returned. You can filter on update Provider, Name and Version property. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -736,7 +789,10 @@ public PagedIterable listBestUpdatesForGroup(String groupId, Request
* @param groupId Group identity.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of deployments for a group.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 deployments for a group as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -752,7 +808,7 @@ public PagedIterable listDeploymentsForGroup(String groupId, Request
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -776,6 +832,9 @@ public PagedIterable listDeploymentsForGroup(String groupId, Request
* @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 properties of a deployment along with {@link Response}.
*/
@Generated
@@ -793,7 +852,7 @@ public Response getDeploymentWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -835,6 +894,9 @@ public Response getDeploymentWithResponse(
* @param deployment The deployment properties.
* @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 deployment metadata along with {@link Response}.
*/
@Generated
@@ -853,13 +915,16 @@ public Response createOrUpdateDeploymentWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param groupId Group identity.
* @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
@@ -878,7 +943,7 @@ public Response deleteDeploymentWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -898,6 +963,9 @@ public Response deleteDeploymentWithResponse(
* @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 status of a deployment including a breakdown of how many devices in the deployment are in progress,
* completed, or failed along with {@link Response}.
*/
@@ -916,8 +984,8 @@ public Response getDeploymentStatusWithResponse(
*
* 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. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -941,7 +1009,11 @@ public Response getDeploymentStatusWithResponse(
* @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.
- * @return a list of devices in a deployment along with their state.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -958,7 +1030,7 @@ public PagedIterable listDeploymentDevices(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -966,7 +1038,7 @@ public PagedIterable listDeploymentDevices(
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -1000,6 +1072,9 @@ public PagedIterable listDeploymentDevices(
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 operation metadata along with {@link Response}.
*/
@Generated
@@ -1016,9 +1091,9 @@ public Response getOperationWithResponse(String operationId, Request
*
* 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 | String | 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. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * $top | String | 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. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1056,7 +1131,10 @@ public Response getOperationWithResponse(String operationId, Request
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all device import operations.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 import operations as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -1072,7 +1150,7 @@ public PagedIterable listOperations(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -1115,6 +1193,9 @@ public PagedIterable listOperations(RequestOptions requestOptions) {
* @param logCollectionRequest The deployment properties.
* @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 diagnostics request body along with {@link Response}.
*/
@Generated
@@ -1132,7 +1213,7 @@ public Response collectLogsWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1156,6 +1237,9 @@ public Response collectLogsWithResponse(
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 operation along with {@link Response}.
*/
@Generated
@@ -1173,7 +1257,7 @@ public Response getLogCollectionOperationWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1201,7 +1285,10 @@ public Response getLogCollectionOperationWithResponse(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return all device diagnostics log collection operations.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 all device diagnostics log collection operations as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -1217,7 +1304,7 @@ public PagedIterable listLogCollectionOperations(RequestOptions requ
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1245,6 +1332,9 @@ public PagedIterable listLogCollectionOperations(RequestOptions requ
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 diagnostics log collection operation with detailed status along with {@link Response}.
*/
@Generated
@@ -1263,7 +1353,7 @@ public Response getLogCollectionOperationDetailedStatusWithResponse(
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Cancel deployment action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1287,6 +1377,9 @@ public Response getLogCollectionOperationDetailedStatusWithResponse(
* @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 deployment metadata along with {@link Response}.
*/
@Generated
@@ -1305,7 +1398,7 @@ public Response stopDeploymentWithResponse(
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Retry deployment action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -1329,6 +1422,9 @@ public Response stopDeploymentWithResponse(
* @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 deployment metadata along with {@link Response}.
*/
@Generated
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java
new file mode 100644
index 0000000000000..200243a3abe34
--- /dev/null
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceManagementClientBuilder.java
@@ -0,0 +1,329 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.iot.deviceupdate;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AddHeadersPolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.CookiePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.util.ClientOptions;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.serializer.JacksonAdapter;
+import com.azure.iot.deviceupdate.implementation.DeviceUpdateClientImpl;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/** A builder for creating a new instance of the DeviceManagementClient type. */
+@ServiceClientBuilder(serviceClients = {DeviceManagementClient.class, DeviceManagementAsyncClient.class})
+public final class DeviceManagementClientBuilder {
+ @Generated private static final String SDK_NAME = "name";
+
+ @Generated private static final String SDK_VERSION = "version";
+
+ @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://api.adu.microsoft.com/.default"};
+
+ @Generated
+ private final Map properties = CoreUtils.getProperties("azure-iot-deviceupdate.properties");
+
+ /** Create an instance of the DeviceManagementClientBuilder. */
+ @Generated
+ public DeviceManagementClientBuilder() {
+ this.pipelinePolicies = new ArrayList<>();
+ }
+
+ /*
+ * Account endpoint.
+ */
+ @Generated private String endpoint;
+
+ /**
+ * Sets Account endpoint.
+ *
+ * @param endpoint the endpoint value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * Account instance identifier.
+ */
+ @Generated private String instanceId;
+
+ /**
+ * Sets Account instance identifier.
+ *
+ * @param instanceId the instanceId value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder instanceId(String instanceId) {
+ this.instanceId = instanceId;
+ return this;
+ }
+
+ /*
+ * Service version
+ */
+ @Generated private DeviceUpdateServiceVersion serviceVersion;
+
+ /**
+ * Sets Service version.
+ *
+ * @param serviceVersion the serviceVersion value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder serviceVersion(DeviceUpdateServiceVersion serviceVersion) {
+ this.serviceVersion = serviceVersion;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ @Generated private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The HTTP client used to send the request.
+ */
+ @Generated private HttpClient httpClient;
+
+ /**
+ * Sets The HTTP client used to send the request.
+ *
+ * @param httpClient the httpClient value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
+ return this;
+ }
+
+ /*
+ * The configuration store that is used during construction of the service
+ * client.
+ */
+ @Generated private Configuration configuration;
+
+ /**
+ * Sets The configuration store that is used during construction of the service client.
+ *
+ * @param configuration the configuration value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder configuration(Configuration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ /*
+ * The TokenCredential used for authentication.
+ */
+ @Generated private TokenCredential tokenCredential;
+
+ /**
+ * Sets The TokenCredential used for authentication.
+ *
+ * @param tokenCredential the tokenCredential value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder credential(TokenCredential tokenCredential) {
+ this.tokenCredential = tokenCredential;
+ return this;
+ }
+
+ /*
+ * The logging configuration for HTTP requests and responses.
+ */
+ @Generated private HttpLogOptions httpLogOptions;
+
+ /**
+ * Sets The logging configuration for HTTP requests and responses.
+ *
+ * @param httpLogOptions the httpLogOptions value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = httpLogOptions;
+ return this;
+ }
+
+ /*
+ * The retry policy that will attempt to retry failed requests, if
+ * applicable.
+ */
+ @Generated private RetryPolicy retryPolicy;
+
+ /**
+ * Sets The retry policy that will attempt to retry failed requests, if applicable.
+ *
+ * @param retryPolicy the retryPolicy value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = retryPolicy;
+ return this;
+ }
+
+ /*
+ * The list of Http pipeline policies to add.
+ */
+ @Generated private final List pipelinePolicies;
+
+ /*
+ * The client options such as application ID and custom headers to set on a
+ * request.
+ */
+ @Generated private ClientOptions clientOptions;
+
+ /**
+ * Sets The client options such as application ID and custom headers to set on a request.
+ *
+ * @param clientOptions the clientOptions value.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder clientOptions(ClientOptions clientOptions) {
+ this.clientOptions = clientOptions;
+ return this;
+ }
+
+ /**
+ * Adds a custom Http pipeline policy.
+ *
+ * @param customPolicy The custom Http pipeline policy to add.
+ * @return the DeviceManagementClientBuilder.
+ */
+ @Generated
+ public DeviceManagementClientBuilder addPolicy(HttpPipelinePolicy customPolicy) {
+ pipelinePolicies.add(customPolicy);
+ return this;
+ }
+
+ /**
+ * Builds an instance of DeviceUpdateClientImpl with the provided parameters.
+ *
+ * @return an instance of DeviceUpdateClientImpl.
+ */
+ @Generated
+ private DeviceUpdateClientImpl buildInnerClient() {
+ if (serviceVersion == null) {
+ this.serviceVersion = DeviceUpdateServiceVersion.getLatest();
+ }
+ if (pipeline == null) {
+ this.pipeline = createHttpPipeline();
+ }
+ DeviceUpdateClientImpl client =
+ new DeviceUpdateClientImpl(
+ pipeline,
+ JacksonAdapter.createDefaultSerializerAdapter(),
+ endpoint,
+ instanceId,
+ serviceVersion);
+ return client;
+ }
+
+ @Generated
+ private HttpPipeline createHttpPipeline() {
+ Configuration buildConfiguration =
+ (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;
+ if (httpLogOptions == null) {
+ httpLogOptions = new HttpLogOptions();
+ }
+ if (clientOptions == null) {
+ clientOptions = new ClientOptions();
+ }
+ List policies = new ArrayList<>();
+ String clientName = properties.getOrDefault(SDK_NAME, "UnknownName");
+ String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion");
+ String applicationId = CoreUtils.getApplicationId(clientOptions, httpLogOptions);
+ policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));
+ HttpHeaders headers = new HttpHeaders();
+ clientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue()));
+ if (headers.getSize() > 0) {
+ policies.add(new AddHeadersPolicy(headers));
+ }
+ policies.addAll(
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy);
+ policies.add(new CookiePolicy());
+ if (tokenCredential != null) {
+ policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
+ }
+ policies.addAll(
+ this.pipelinePolicies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .httpClient(httpClient)
+ .clientOptions(clientOptions)
+ .build();
+ return httpPipeline;
+ }
+
+ /**
+ * Builds an instance of DeviceManagementAsyncClient async client.
+ *
+ * @return an instance of DeviceManagementAsyncClient.
+ */
+ @Generated
+ public DeviceManagementAsyncClient buildAsyncClient() {
+ return new DeviceManagementAsyncClient(buildInnerClient().getDeviceManagements());
+ }
+
+ /**
+ * Builds an instance of DeviceManagementClient sync client.
+ *
+ * @return an instance of DeviceManagementClient.
+ */
+ @Generated
+ public DeviceManagementClient buildClient() {
+ return new DeviceManagementClient(buildInnerClient().getDeviceManagements());
+ }
+}
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 e21ea0d6d525f..637e1eada664d 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
@@ -8,7 +8,10 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
@@ -41,7 +44,7 @@ public final class DeviceUpdateAsyncClient {
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Import update action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -114,6 +117,9 @@ public final class DeviceUpdateAsyncClient {
* @param updateToImport The update to be imported.
* @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 update metadata along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -132,7 +138,7 @@ public Mono> importUpdateWithResponse(
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Import update action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -205,7 +211,10 @@ public Mono> importUpdateWithResponse(
* @param updateToImport The update to be imported.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return update metadata along with {@link Response} on successful completion of {@link Mono}.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PollerFlux} for polling of update metadata.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
@@ -222,9 +231,9 @@ public PollerFlux beginImportUpdate(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
- * search | String | No | Request updates matching a free-text search expression. |
- * filter | String | No | Filter updates by its properties. |
+ * api-version | String | Yes | Api Version |
+ * $search | String | No | Request updates matching a free-text search expression. |
+ * $filter | String | No | Filter updates by its properties. |
*
*
* Response Body Schema
@@ -278,7 +287,11 @@ public PollerFlux beginImportUpdate(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all updates that have been imported to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -294,7 +307,7 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -302,7 +315,7 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -354,6 +367,9 @@ public PagedFlux listUpdates(RequestOptions requestOptions) {
* @param version Update version.
* @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 specific update version along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@@ -371,7 +387,7 @@ public Mono> getUpdateWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param provider Update provider.
@@ -379,6 +395,9 @@ public Mono> getUpdateWithResponse(
* @param version Update version.
* @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
@@ -396,7 +415,7 @@ public Mono> deleteUpdateWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param provider Update provider.
@@ -404,7 +423,10 @@ public Mono> deleteUpdateWithResponse(
* @param version Update version.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PollerFlux} for polling of long-running operation.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
@@ -421,7 +443,7 @@ public PollerFlux beginDeleteUpdate(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -437,7 +459,11 @@ public PollerFlux beginDeleteUpdate(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all update providers that have been imported to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -453,7 +479,7 @@ public PagedFlux listProviders(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -470,7 +496,11 @@ public PagedFlux listProviders(RequestOptions requestOptions) {
* @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.
- * @return a list of all update names that match the specified provider.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -486,8 +516,8 @@ public PagedFlux listNames(String provider, RequestOptions requestOp
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
- * filter | String | No | Filter updates by its properties. |
+ * api-version | String | Yes | Api Version |
+ * $filter | String | No | Filter updates by its properties. |
*
*
* Response Body Schema
@@ -505,7 +535,11 @@ public PagedFlux listNames(String provider, RequestOptions requestOp
* @param name Update name.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all update versions that match the specified provider and name.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -521,7 +555,7 @@ public PagedFlux listVersions(String provider, String name, RequestO
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -540,7 +574,11 @@ public PagedFlux listVersions(String provider, String name, RequestO
* @param version Update version.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all update file identifiers for the specified version.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -557,7 +595,7 @@ public PagedFlux listFiles(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -565,7 +603,7 @@ public PagedFlux listFiles(
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -591,6 +629,9 @@ public PagedFlux listFiles(
* @param fileId File 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 a specific update file from the version along with {@link Response} on successful completion of {@link
* Mono}.
*/
@@ -610,9 +651,9 @@ public Mono> getFileWithResponse(
*
* 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 | String | 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. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * $top | String | 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. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -656,7 +697,10 @@ public Mono> getFileWithResponse(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all import update operations.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 import update operations as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -672,7 +716,7 @@ public PagedFlux listOperations(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -680,7 +724,7 @@ public PagedFlux listOperations(RequestOptions requestOptions) {
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -720,6 +764,9 @@ public PagedFlux listOperations(RequestOptions requestOptions) {
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 operation metadata along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java
index df4d34c751dea..927bcc33eb73c 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClient.java
@@ -8,14 +8,16 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
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.DeviceUpdatesImpl;
-import reactor.core.publisher.Mono;
/** Initializes a new instance of the synchronous DeviceUpdateClient type. */
@ServiceClient(builder = DeviceUpdateClientBuilder.class)
@@ -41,7 +43,7 @@ public final class DeviceUpdateClient {
* Query Parameters
* Name | Type | Required | Description |
* action | String | Yes | Import update action. |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Request Body Schema
@@ -114,7 +116,10 @@ public final class DeviceUpdateClient {
* @param updateToImport The update to be imported.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return update metadata along with {@link Response} on successful completion of {@link Mono}.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 SyncPoller} for polling of update metadata.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
@@ -131,9 +136,9 @@ public SyncPoller beginImportUpdate(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
- * search | String | No | Request updates matching a free-text search expression. |
- * filter | String | No | Filter updates by its properties. |
+ * api-version | String | Yes | Api Version |
+ * $search | String | No | Request updates matching a free-text search expression. |
+ * $filter | String | No | Filter updates by its properties. |
*
*
* Response Body Schema
@@ -187,7 +192,11 @@ public SyncPoller beginImportUpdate(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all updates that have been imported to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -203,7 +212,7 @@ public PagedIterable listUpdates(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -211,7 +220,7 @@ public PagedIterable listUpdates(RequestOptions requestOptions) {
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -263,6 +272,9 @@ public PagedIterable listUpdates(RequestOptions requestOptions) {
* @param version Update version.
* @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 specific update version along with {@link Response}.
*/
@Generated
@@ -280,7 +292,7 @@ public Response getUpdateWithResponse(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* @param provider Update provider.
@@ -288,7 +300,10 @@ public Response getUpdateWithResponse(
* @param version Update version.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 SyncPoller} for polling of long-running operation.
*/
@Generated
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
@@ -305,7 +320,7 @@ public SyncPoller beginDeleteUpdate(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -321,7 +336,11 @@ public SyncPoller beginDeleteUpdate(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all update providers that have been imported to Device Update for IoT Hub.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -337,7 +356,7 @@ public PagedIterable listProviders(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -354,7 +373,11 @@ public PagedIterable listProviders(RequestOptions requestOptions) {
* @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.
- * @return a list of all update names that match the specified provider.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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
+ * PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -370,8 +393,8 @@ public PagedIterable listNames(String provider, RequestOptions reque
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
- * filter | String | No | Filter updates by its properties. |
+ * api-version | String | Yes | Api Version |
+ * $filter | String | No | Filter updates by its properties. |
*
*
* Response Body Schema
@@ -389,7 +412,11 @@ public PagedIterable listNames(String provider, RequestOptions reque
* @param name Update name.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all update versions that match the specified provider and name.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -405,7 +432,7 @@ public PagedIterable listVersions(String provider, String name, Requ
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -424,7 +451,11 @@ public PagedIterable listVersions(String provider, String name, Requ
* @param version Update version.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all update file identifiers for the specified version.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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
+ * PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -441,7 +472,7 @@ public PagedIterable listFiles(
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -449,7 +480,7 @@ public PagedIterable listFiles(
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -475,6 +506,9 @@ public PagedIterable listFiles(
* @param fileId File 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 a specific update file from the version along with {@link Response}.
*/
@Generated
@@ -493,9 +527,9 @@ public Response getFileWithResponse(
*
* 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 | String | 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. |
- * apiVersion | String | Yes | Api Version |
+ * $filter | String | No | Restricts the set of operations returned. Only one specific filter is supported: "status eq 'NotStarted' or status eq 'Running'" |
+ * $top | String | 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. |
+ * api-version | String | Yes | Api Version |
*
*
* Response Body Schema
@@ -539,7 +573,10 @@ public Response getFileWithResponse(
*
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
- * @return a list of all import update operations.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 import update operations as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -555,7 +592,7 @@ public PagedIterable listOperations(RequestOptions requestOptions) {
*
* Query Parameters
* Name | Type | Required | Description |
- * apiVersion | String | Yes | Api Version |
+ * api-version | String | Yes | Api Version |
*
*
* Header Parameters
@@ -563,7 +600,7 @@ public PagedIterable listOperations(RequestOptions requestOptions) {
*
* Header Parameters
* Name | Type | Required | Description |
- * ifNoneMatch | 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. |
+ * 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. |
*
*
* Response Body Schema
@@ -603,6 +640,9 @@ public PagedIterable listOperations(RequestOptions requestOptions) {
* @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.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if 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 operation metadata along with {@link Response}.
*/
@Generated
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java
index 01eee13bea6c2..25e209ff4b5e3 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/DeviceUpdateClientBuilder.java
@@ -32,19 +32,13 @@
import java.util.stream.Collectors;
/** A builder for creating a new instance of the DeviceUpdateClient type. */
-@ServiceClientBuilder(
- serviceClients = {
- DeviceUpdateClient.class,
- DeviceManagementClient.class,
- DeviceUpdateAsyncClient.class,
- DeviceManagementAsyncClient.class
- })
+@ServiceClientBuilder(serviceClients = {DeviceUpdateClient.class, DeviceUpdateAsyncClient.class})
public final class DeviceUpdateClientBuilder {
@Generated private static final String SDK_NAME = "name";
@Generated private static final String SDK_VERSION = "version";
- @Generated static final String[] DEFAULT_SCOPES = new String[] {"https://api.adu.microsoft.com/.default"};
+ @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://api.adu.microsoft.com/.default"};
@Generated
private final Map properties = CoreUtils.getProperties("azure-iot-deviceupdate.properties");
@@ -319,37 +313,17 @@ private HttpPipeline createHttpPipeline() {
* @return an instance of DeviceUpdateAsyncClient.
*/
@Generated
- public DeviceUpdateAsyncClient buildDeviceUpdateAsyncClient() {
+ public DeviceUpdateAsyncClient buildAsyncClient() {
return new DeviceUpdateAsyncClient(buildInnerClient().getDeviceUpdates());
}
- /**
- * Builds an instance of DeviceManagementAsyncClient async client.
- *
- * @return an instance of DeviceManagementAsyncClient.
- */
- @Generated
- public DeviceManagementAsyncClient buildDeviceManagementAsyncClient() {
- return new DeviceManagementAsyncClient(buildInnerClient().getDeviceManagements());
- }
-
/**
* Builds an instance of DeviceUpdateClient sync client.
*
* @return an instance of DeviceUpdateClient.
*/
@Generated
- public DeviceUpdateClient buildDeviceUpdateClient() {
+ public DeviceUpdateClient buildClient() {
return new DeviceUpdateClient(buildInnerClient().getDeviceUpdates());
}
-
- /**
- * Builds an instance of DeviceManagementClient sync client.
- *
- * @return an instance of DeviceManagementClient.
- */
- @Generated
- public DeviceManagementClient buildDeviceManagementClient() {
- return new DeviceManagementClient(buildInnerClient().getDeviceManagements());
- }
}
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java
index c9ab2cebe6e70..a2ffc73a063be 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/src/main/java/com/azure/iot/deviceupdate/implementation/DeviceManagementsImpl.java
@@ -17,7 +17,11 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
+import com.azure.core.exception.ResourceModifiedException;
+import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.PagedFlux;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.PagedResponse;
@@ -67,6 +71,16 @@ public final class DeviceManagementsImpl {
private interface DeviceManagementsService {
@Get("/deviceupdate/{instanceId}/management/deviceclasses")
@ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(
+ value = ClientAuthenticationException.class,
+ code = {401})
+ @UnexpectedResponseExceptionType(
+ value = ResourceNotFoundException.class,
+ code = {404})
+ @UnexpectedResponseExceptionType(
+ value = ResourceModifiedException.class,
+ code = {409})
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
Mono