diff --git a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
index accb72049662..3bc255d26242 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
+++ b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.2.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-06-02)
+
+- Azure Resource Manager IotHub client library for Java. This package contains Microsoft Azure SDK for IotHub Management SDK. Use this API to manage the IoT hubs in your Azure subscription. Package tag package-2021-07-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/iothub/azure-resourcemanager-iothub/README.md b/sdk/iothub/azure-resourcemanager-iothub/README.md
index 8a6fbc9bb514..6dd1f812d41f 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/README.md
+++ b/sdk/iothub/azure-resourcemanager-iothub/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-iothub
- 1.2.0-beta.1
+ 1.2.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
index 08e725325d60..7c57325744b7 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
@@ -10,11 +10,13 @@
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
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.RequestIdPolicy;
+import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -87,6 +89,19 @@ public static IotHubManager authenticate(TokenCredential credential, AzureProfil
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of IotHub service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the IotHub service API instance.
+ */
+ public static IotHubManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new IotHubManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create IotHubManager with optional configuration.
*
@@ -98,13 +113,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -165,6 +181,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -172,9 +201,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -196,7 +227,7 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
.append("-")
.append("com.azure.resourcemanager.iothub")
.append("/")
- .append("1.2.0-beta.1");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -214,10 +245,15 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
}
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
policies
.addAll(
@@ -248,7 +284,11 @@ public IotHubManager authenticate(TokenCredential credential, AzureProfile profi
}
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -256,7 +296,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of IotHubResources. */
+ /**
+ * Gets the resource collection API of IotHubResources. It manages IotHubDescription, EventHubConsumerGroupInfo.
+ *
+ * @return Resource collection API of IotHubResources.
+ */
public IotHubResources iotHubResources() {
if (this.iotHubResources == null) {
this.iotHubResources = new IotHubResourcesImpl(clientObject.getIotHubResources(), this);
@@ -264,7 +308,11 @@ public IotHubResources iotHubResources() {
return iotHubResources;
}
- /** @return Resource collection API of ResourceProviderCommons. */
+ /**
+ * Gets the resource collection API of ResourceProviderCommons.
+ *
+ * @return Resource collection API of ResourceProviderCommons.
+ */
public ResourceProviderCommons resourceProviderCommons() {
if (this.resourceProviderCommons == null) {
this.resourceProviderCommons =
@@ -273,7 +321,11 @@ public ResourceProviderCommons resourceProviderCommons() {
return resourceProviderCommons;
}
- /** @return Resource collection API of Certificates. */
+ /**
+ * Gets the resource collection API of Certificates. It manages CertificateDescription.
+ *
+ * @return Resource collection API of Certificates.
+ */
public Certificates certificates() {
if (this.certificates == null) {
this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
@@ -281,7 +333,11 @@ public Certificates certificates() {
return certificates;
}
- /** @return Resource collection API of IotHubs. */
+ /**
+ * Gets the resource collection API of IotHubs.
+ *
+ * @return Resource collection API of IotHubs.
+ */
public IotHubs iotHubs() {
if (this.iotHubs == null) {
this.iotHubs = new IotHubsImpl(clientObject.getIotHubs(), this);
@@ -289,7 +345,11 @@ public IotHubs iotHubs() {
return iotHubs;
}
- /** @return Resource collection API of PrivateLinkResourcesOperations. */
+ /**
+ * Gets the resource collection API of PrivateLinkResourcesOperations.
+ *
+ * @return Resource collection API of PrivateLinkResourcesOperations.
+ */
public PrivateLinkResourcesOperations privateLinkResourcesOperations() {
if (this.privateLinkResourcesOperations == null) {
this.privateLinkResourcesOperations =
@@ -298,7 +358,11 @@ public PrivateLinkResourcesOperations privateLinkResourcesOperations() {
return privateLinkResourcesOperations;
}
- /** @return Resource collection API of PrivateEndpointConnections. */
+ /**
+ * Gets the resource collection API of PrivateEndpointConnections.
+ *
+ * @return Resource collection API of PrivateEndpointConnections.
+ */
public PrivateEndpointConnections privateEndpointConnections() {
if (this.privateEndpointConnections == null) {
this.privateEndpointConnections =
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
index 0091de3188e0..44bab00892a3 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
@@ -29,7 +29,6 @@
import com.azure.resourcemanager.iothub.models.TagsResource;
import com.azure.resourcemanager.iothub.models.TestAllRoutesInput;
import com.azure.resourcemanager.iothub.models.TestRouteInput;
-import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in IotHubResourcesClient. */
public interface IotHubResourcesClient {
@@ -78,7 +77,7 @@ Response getByResourceGroupWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the description of the IoT hub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate(
@@ -100,7 +99,7 @@ SyncPoller, IotHubDescriptionInner> beginCrea
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the description of the IoT hub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate(
@@ -185,7 +184,7 @@ IotHubDescriptionInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the description of the IoT hub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, IotHubDescriptionInner> beginUpdate(
@@ -201,7 +200,7 @@ SyncPoller, IotHubDescriptionInner> beginUpda
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the description of the IoT hub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, IotHubDescriptionInner> beginUpdate(
@@ -246,7 +245,7 @@ IotHubDescriptionInner update(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the description of the IoT hub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, IotHubDescriptionInner> beginDelete(
@@ -262,7 +261,7 @@ SyncPoller, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the description of the IoT hub along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the description of the IoT hub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, IotHubDescriptionInner> beginDelete(
@@ -303,7 +302,7 @@ SyncPoller, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the IoT hubs in a subscription.
+ * @return all the IoT hubs in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -316,7 +315,7 @@ SyncPoller, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the IoT hubs in a subscription.
+ * @return all the IoT hubs in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -329,7 +328,7 @@ SyncPoller, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the IoT hubs in a resource group.
+ * @return all the IoT hubs in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -343,7 +342,7 @@ SyncPoller, IotHubDescriptionInner> beginDele
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all the IoT hubs in a resource group.
+ * @return all the IoT hubs in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -387,7 +386,7 @@ Response getStatsWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of valid SKUs for an IoT hub.
+ * @return the list of valid SKUs for an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable getValidSkus(String resourceGroupName, String resourceName);
@@ -402,7 +401,7 @@ Response getStatsWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of valid SKUs for an IoT hub.
+ * @return the list of valid SKUs for an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable getValidSkus(
@@ -418,7 +417,8 @@ PagedIterable getValidSkus(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
+ * @return a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub as
+ * paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listEventHubConsumerGroups(
@@ -435,7 +435,8 @@ PagedIterable listEventHubConsumerGroups(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
+ * @return a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub as
+ * paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listEventHubConsumerGroups(
@@ -567,7 +568,7 @@ Response deleteEventHubConsumerGroupWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of all the jobs in an IoT hub.
+ * @return a list of all the jobs in an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listJobs(String resourceGroupName, String resourceName);
@@ -583,7 +584,7 @@ Response deleteEventHubConsumerGroupWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of all the jobs in an IoT hub.
+ * @return a list of all the jobs in an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listJobs(String resourceGroupName, String resourceName, Context context);
@@ -631,7 +632,7 @@ Response getJobWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the quota metrics for an IoT hub.
+ * @return the quota metrics for an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable getQuotaMetrics(String resourceGroupName, String resourceName);
@@ -646,7 +647,7 @@ Response getJobWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the quota metrics for an IoT hub.
+ * @return the quota metrics for an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable getQuotaMetrics(
@@ -661,7 +662,7 @@ PagedIterable getQuotaMetrics(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the health for routing endpoints.
+ * @return the health for routing endpoints as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable getEndpointHealth(String resourceGroupName, String iotHubName);
@@ -676,7 +677,7 @@ PagedIterable getQuotaMetrics(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the health for routing endpoints.
+ * @return the health for routing endpoints as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable getEndpointHealth(
@@ -786,7 +787,7 @@ Response testRouteWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the security metadata for an IoT hub.
+ * @return the security metadata for an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listKeys(String resourceGroupName, String resourceName);
@@ -802,7 +803,7 @@ Response testRouteWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the security metadata for an IoT hub.
+ * @return the security metadata for an IoT hub as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listKeys(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java
index c61e8b6eaa79..eef53a454d48 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java
@@ -6,12 +6,10 @@
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.iothub.models.FailoverInput;
-import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in IotHubsClient. */
public interface IotHubsClient {
@@ -27,7 +25,7 @@ public interface IotHubsClient {
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginManualFailover(
@@ -46,7 +44,7 @@ SyncPoller, Void> beginManualFailover(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginManualFailover(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/OperationsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/OperationsClient.java
index c404a7b96c1b..f3e9b9c87cf0 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/OperationsClient.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/OperationsClient.java
@@ -18,7 +18,7 @@ public interface OperationsClient {
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list IoT Hub operations.
+ * @return result of the request to list IoT Hub operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -31,7 +31,7 @@ public interface OperationsClient {
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list IoT Hub operations.
+ * @return result of the request to list IoT Hub operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java
index eeac345828ab..e67ab23049bc 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java
@@ -12,7 +12,6 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner;
import java.util.List;
-import reactor.core.publisher.Mono;
/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
public interface PrivateEndpointConnectionsClient {
@@ -90,8 +89,7 @@ Response getWithResponse(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the private endpoint connection of an IotHub along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the private endpoint connection of an IotHub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginUpdate(
@@ -112,8 +110,7 @@ SyncPoller, PrivateEndpointConnection
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the private endpoint connection of an IotHub along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the private endpoint connection of an IotHub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginUpdate(
@@ -175,8 +172,7 @@ PrivateEndpointConnectionInner update(
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the private endpoint connection of an IotHub along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the private endpoint connection of an IotHub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginDelete(
@@ -193,8 +189,7 @@ SyncPoller, PrivateEndpointConnection
* @throws com.azure.resourcemanager.iothub.models.ErrorDetailsException thrown if the request is rejected by
* server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the private endpoint connection of an IotHub along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the {@link SyncPoller} for polling of the private endpoint connection of an IotHub.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginDelete(
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateDescriptionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateDescriptionInner.java
index 4e3667bc3495..9a279107e23d 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateDescriptionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateDescriptionInner.java
@@ -6,16 +6,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.CertificateProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The X509 Certificate. */
@Fluent
public final class CertificateDescriptionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateDescriptionInner.class);
-
/*
* The description of an X509 CA Certificate.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateListDescriptionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateListDescriptionInner.java
index 6ec54577bdd9..224446fc9059 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateListDescriptionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateListDescriptionInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The JSON-serialized array of Certificate objects. */
@Fluent
public final class CertificateListDescriptionInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateListDescriptionInner.class);
-
/*
* The array of Certificate objects.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateWithNonceDescriptionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateWithNonceDescriptionInner.java
index 872bcaa040a4..e4b4ae159d98 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateWithNonceDescriptionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateWithNonceDescriptionInner.java
@@ -6,16 +6,12 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.CertificatePropertiesWithNonce;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The X509 Certificate. */
@Fluent
public final class CertificateWithNonceDescriptionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateWithNonceDescriptionInner.class);
-
/*
* The description of an X509 CA Certificate including the challenge nonce
* issued for the Proof-Of-Possession flow.
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
index 2091a2c740a4..9571c8783dc2 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
@@ -6,17 +6,13 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.DateTimeRfc1123;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The health data for an endpoint. */
@Fluent
public final class EndpointHealthDataInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointHealthDataInner.class);
-
/*
* Id of the endpoint
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
index 36a93adaf459..3f31cc5a8b65 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
@@ -6,8 +6,6 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -15,8 +13,6 @@
/** The properties of the EventHubConsumerGroupInfo object. */
@Fluent
public final class EventHubConsumerGroupInfoInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConsumerGroupInfoInner.class);
-
/*
* The tags.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/GroupIdInformationInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/GroupIdInformationInner.java
index 69ec9283f78c..9b709713887e 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/GroupIdInformationInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/GroupIdInformationInner.java
@@ -7,14 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.GroupIdInformationProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The group information for creating a private endpoint on an IotHub. */
@Fluent
public final class GroupIdInformationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationInner.class);
-
/*
* The resource identifier.
*/
@@ -93,7 +90,7 @@ public GroupIdInformationInner withProperties(GroupIdInformationProperties prope
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model GroupIdInformationInner"));
@@ -101,4 +98,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(GroupIdInformationInner.class);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
index a6a0e9664bc5..83aba12c70c1 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
@@ -11,15 +11,12 @@
import com.azure.resourcemanager.iothub.models.ArmIdentity;
import com.azure.resourcemanager.iothub.models.IotHubProperties;
import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** The description of the IoT hub. */
@Fluent
public final class IotHubDescriptionInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubDescriptionInner.class);
-
/*
* The Etag field is *not* required. If it is provided in the response
* body, it must also be provided as a header per the normal ETag
@@ -167,7 +164,7 @@ public void validate() {
properties().validate();
}
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model IotHubDescriptionInner"));
} else {
@@ -177,4 +174,6 @@ public void validate() {
identity().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(IotHubDescriptionInner.class);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubNameAvailabilityInfoInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubNameAvailabilityInfoInner.java
index 290637ad2150..220c14db378b 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubNameAvailabilityInfoInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubNameAvailabilityInfoInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.IotHubNameUnavailabilityReason;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties indicating whether a given IoT hub name is available. */
@Fluent
public final class IotHubNameAvailabilityInfoInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubNameAvailabilityInfoInner.class);
-
/*
* The value which indicates whether the provided name is available.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubQuotaMetricInfoInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubQuotaMetricInfoInner.java
index e82c4fb87f8b..84c9b471bbac 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubQuotaMetricInfoInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubQuotaMetricInfoInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Quota metrics properties. */
@Immutable
public final class IotHubQuotaMetricInfoInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubQuotaMetricInfoInner.class);
-
/*
* The name of the quota metric.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubSkuDescriptionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubSkuDescriptionInner.java
index 72e8ad5a00c6..a0d9c52024a1 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubSkuDescriptionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubSkuDescriptionInner.java
@@ -8,14 +8,11 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.IotHubCapacity;
import com.azure.resourcemanager.iothub.models.IotHubSkuInfo;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** SKU properties. */
@Fluent
public final class IotHubSkuDescriptionInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubSkuDescriptionInner.class);
-
/*
* The type of the resource.
*/
@@ -90,14 +87,14 @@ public IotHubSkuDescriptionInner withCapacity(IotHubCapacity capacity) {
*/
public void validate() {
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model IotHubSkuDescriptionInner"));
} else {
sku().validate();
}
if (capacity() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property capacity in model IotHubSkuDescriptionInner"));
@@ -105,4 +102,6 @@ public void validate() {
capacity().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(IotHubSkuDescriptionInner.class);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/JobResponseInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/JobResponseInner.java
index 14c777199619..2f9c443287c7 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/JobResponseInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/JobResponseInner.java
@@ -6,18 +6,14 @@
import com.azure.core.annotation.Immutable;
import com.azure.core.util.DateTimeRfc1123;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.JobStatus;
import com.azure.resourcemanager.iothub.models.JobType;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The properties of the Job Response object. */
@Immutable
public final class JobResponseInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResponseInner.class);
-
/*
* The job identifier.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/OperationInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/OperationInner.java
index 81b5caab0d88..fe3c409f1305 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/OperationInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/OperationInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.OperationDisplay;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** IoT Hub REST API operation. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* Operation name: {provider}/{resource}/{read | write | action | delete}
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateEndpointConnectionInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateEndpointConnectionInner.java
index 57368cce9800..70ec1e4bb3fe 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateEndpointConnectionInner.java
@@ -8,14 +8,11 @@
import com.azure.core.management.ProxyResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.PrivateEndpointConnectionProperties;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The private endpoint connection of an IotHub. */
@Fluent
public final class PrivateEndpointConnectionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
-
/*
* The properties of a private endpoint connection
*/
@@ -49,7 +46,7 @@ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionPr
*/
public void validate() {
if (properties() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property properties in model PrivateEndpointConnectionInner"));
@@ -57,4 +54,6 @@ public void validate() {
properties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionInner.class);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateLinkResourcesInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateLinkResourcesInner.java
index 5516fc45a2d5..6b642dedb9ef 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateLinkResourcesInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateLinkResourcesInner.java
@@ -5,16 +5,12 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** The available private link resources for an IotHub. */
@Fluent
public final class PrivateLinkResourcesInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesInner.class);
-
/*
* The list of available private link resources for an IotHub
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/RegistryStatisticsInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/RegistryStatisticsInner.java
index 15d0c948a8f7..5188da0f6567 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/RegistryStatisticsInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/RegistryStatisticsInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Identity registry statistics. */
@Immutable
public final class RegistryStatisticsInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistryStatisticsInner.class);
-
/*
* The total count of devices in the identity registry.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/SharedAccessSignatureAuthorizationRuleInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/SharedAccessSignatureAuthorizationRuleInner.java
index 86a4837904c8..d7d38620b29f 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/SharedAccessSignatureAuthorizationRuleInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/SharedAccessSignatureAuthorizationRuleInner.java
@@ -7,14 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.AccessRights;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The properties of an IoT hub shared access policy. */
@Fluent
public final class SharedAccessSignatureAuthorizationRuleInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedAccessSignatureAuthorizationRuleInner.class);
-
/*
* The name of the shared access policy.
*/
@@ -126,16 +123,18 @@ public SharedAccessSignatureAuthorizationRuleInner withRights(AccessRights right
*/
public void validate() {
if (keyName() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property keyName in model SharedAccessSignatureAuthorizationRuleInner"));
}
if (rights() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property rights in model SharedAccessSignatureAuthorizationRuleInner"));
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(SharedAccessSignatureAuthorizationRuleInner.class);
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestAllRoutesResultInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestAllRoutesResultInner.java
index 1c15d09d95c1..d89d3d46ca99 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestAllRoutesResultInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestAllRoutesResultInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.MatchedRoute;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Result of testing all routes. */
@Fluent
public final class TestAllRoutesResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TestAllRoutesResultInner.class);
-
/*
* JSON-serialized array of matched routes
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestRouteResultInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestRouteResultInner.java
index 2feeec924d30..bd47269a717d 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestRouteResultInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestRouteResultInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.TestResultStatus;
import com.azure.resourcemanager.iothub.models.TestRouteResultDetails;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Result of testing one route. */
@Fluent
public final class TestRouteResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(TestRouteResultInner.class);
-
/*
* Result of testing route
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/UserSubscriptionQuotaListResultInner.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/UserSubscriptionQuotaListResultInner.java
index eae7058bb036..4e64d127c9bd 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/UserSubscriptionQuotaListResultInner.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/UserSubscriptionQuotaListResultInner.java
@@ -5,17 +5,13 @@
package com.azure.resourcemanager.iothub.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.models.UserSubscriptionQuota;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Json-serialized array of User subscription quota response. */
@Fluent
public final class UserSubscriptionQuotaListResultInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UserSubscriptionQuotaListResultInner.class);
-
/*
* The value property.
*/
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
index f526e7cd6a82..34d53a6518f5 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
@@ -35,6 +35,10 @@ public String etag() {
return this.innerModel().etag();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public CertificateDescriptionInner innerModel() {
return this.innerObject;
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
index f86d5e7a5d0f..06112af59009 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
@@ -24,7 +24,6 @@
import com.azure.core.http.rest.RestProxy;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.iothub.fluent.CertificatesClient;
import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
@@ -35,8 +34,6 @@
/** An instance of this class provides access to all the operations defined in CertificatesClient. */
public final class CertificatesClientImpl implements CertificatesClient {
- private final ClientLogger logger = new ClientLogger(CertificatesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final CertificatesService service;
@@ -272,14 +269,7 @@ private Mono> listByIotHubWithResponse
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listByIotHubAsync(String resourceGroupName, String resourceName) {
return listByIotHubWithResponseAsync(resourceGroupName, resourceName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -435,14 +425,7 @@ private Mono> getWithResponseAsync(
private Mono getAsync(
String resourceGroupName, String resourceName, String certificateName) {
return getWithResponseAsync(resourceGroupName, resourceName, certificateName)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -641,14 +624,7 @@ private Mono createOrUpdateAsync(
String ifMatch) {
return createOrUpdateWithResponseAsync(
resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -672,14 +648,7 @@ private Mono createOrUpdateAsync(
final String ifMatch = null;
return createOrUpdateWithResponseAsync(
resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -865,7 +834,7 @@ private Mono> deleteWithResponseAsync(
private Mono deleteAsync(
String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
return deleteWithResponseAsync(resourceGroupName, resourceName, certificateName, ifMatch)
- .flatMap((Response res) -> Mono.empty());
+ .flatMap(ignored -> Mono.empty());
}
/**
@@ -1038,14 +1007,7 @@ private Mono> generateVerificatio
private Mono generateVerificationCodeAsync(
String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
return generateVerificationCodeWithResponseAsync(resourceGroupName, resourceName, certificateName, ifMatch)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -1259,14 +1221,7 @@ private Mono verifyAsync(
CertificateVerificationDescription certificateVerificationBody) {
return verifyWithResponseAsync(
resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody)
- .flatMap(
- (Response res) -> {
- if (res.getValue() != null) {
- return Mono.just(res.getValue());
- } else {
- return Mono.empty();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesImpl.java
index 76616ecf508f..3cdd59adceaa 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesImpl.java
@@ -17,10 +17,9 @@
import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
import com.azure.resourcemanager.iothub.models.CertificateWithNonceDescription;
import com.azure.resourcemanager.iothub.models.Certificates;
-import com.fasterxml.jackson.annotation.JsonIgnore;
public final class CertificatesImpl implements Certificates {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificatesImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(CertificatesImpl.class);
private final CertificatesClient innerClient;
@@ -163,7 +162,7 @@ public Response verifyWithResponse(
public CertificateDescription getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -171,14 +170,14 @@ public CertificateDescription getById(String id) {
}
String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
}
String certificateName = Utils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
@@ -189,7 +188,7 @@ public CertificateDescription getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -197,14 +196,14 @@ public Response getByIdWithResponse(String id, Context c
}
String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
}
String certificateName = Utils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
@@ -215,7 +214,7 @@ public Response getByIdWithResponse(String id, Context c
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -223,14 +222,14 @@ public void deleteById(String id) {
}
String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
}
String certificateName = Utils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
@@ -242,7 +241,7 @@ public void deleteById(String id) {
public Response deleteByIdWithResponse(String id, String ifMatch, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -250,14 +249,14 @@ public Response deleteByIdWithResponse(String id, String ifMatch, Context
}
String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
if (resourceName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'IotHubs'.", id)));
}
String certificateName = Utils.getValueFromIdByName(id, "certificates");
if (certificateName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
index 207837154733..b48bd3e7328b 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
@@ -7,7 +7,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
-import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
@@ -67,34 +66,34 @@ public IotHubClientBuilder environment(AzureEnvironment environment) {
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the IotHubClientBuilder.
*/
- public IotHubClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public IotHubClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the IotHubClientBuilder.
*/
- public IotHubClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public IotHubClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -126,15 +125,12 @@ public IotHubClientImpl buildClient() {
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
}
+ if (pipeline == null) {
+ this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ }
if (defaultPollInterval == null) {
this.defaultPollInterval = Duration.ofSeconds(30);
}
- if (pipeline == null) {
- this.pipeline =
- new HttpPipelineBuilder()
- .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
- .build();
- }
if (serializerAdapter == null) {
this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
index b3b708d26c71..5c669902619c 100644
--- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -35,15 +36,12 @@
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
-import java.util.Map;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/** Initializes a new instance of the IotHubClientImpl type. */
@ServiceClient(builder = IotHubClientBuilder.class)
public final class IotHubClientImpl implements IotHubClient {
- private final ClientLogger logger = new ClientLogger(IotHubClientImpl.class);
-
/** The subscription identifier. */
private final String subscriptionId;
@@ -248,10 +246,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry