diff --git a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md index accb72049662f..3bc255d262428 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 8a6fbc9bb514f..6dd1f812d41f5 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.resourcemanager azure-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 08e725325d60b..7c57325744b79 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 0091de3188e03..44bab00892a3d 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 c61e8b6eaa792..eef53a454d48e 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 c404a7b96c1b4..f3e9b9c87cf01 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 eeac345828ab6..e67ab23049bc8 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 4e3667bc34952..9a279107e23d3 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 6ec54577bdd99..224446fc9059b 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 872bcaa040a4f..e4b4ae159d98e 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 2091a2c740a4f..9571c8783dc24 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 36a93adaf459d..3f31cc5a8b657 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 69ec9283f78c8..9b709713887e1 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 a6a0e9664bc5f..83aba12c70c1f 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 290637ad21501..220c14db378b3 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 e82c4fb87f8b5..84c9b471bbac9 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 72e8ad5a00c6e..a0d9c52024a1a 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 14c7771996198..2f9c443287c74 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 81b5caab0d88a..fe3c409f1305d 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 57368cce98007..70ec1e4bb3feb 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 5516fc45a2d5d..6b642dedb9eff 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 15d0c948a8f7b..5188da0f6567e 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 86a4837904c87..d7d38620b29f7 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 1c15d09d95c13..d89d3d46ca999 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 2feeec924d303..bd47269a717de 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 eae7058bb036d..4e64d127c9bd1 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 f526e7cd6a822..34d53a6518f51 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 f86d5e7a5d0fa..06112af59009d 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 76616ecf508f3..3cdd59adceaa6 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 2078371547333..b48bd3e7328bd 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 b3b708d26c718..5c669902619c1 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 entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -315,7 +310,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -374,4 +369,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(IotHubClientImpl.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java index c7271cd979de3..488b458ae10dc 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubDescriptionImpl.java @@ -81,6 +81,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public IotHubDescriptionInner innerModel() { return this.innerObject; } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java index b00cfdc13b47e..07c7341e1173e 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.iothub.fluent.IotHubResourcesClient; @@ -67,8 +66,6 @@ /** An instance of this class provides access to all the operations defined in IotHubResourcesClient. */ public final class IotHubResourcesClientImpl implements IotHubResourcesClient { - private final ClientLogger logger = new ClientLogger(IotHubResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final IotHubResourcesService service; @@ -635,14 +632,7 @@ private Mono> getByResourceGroupWithResponseAsy @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -817,7 +807,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the description of the IoT hub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginCreateOrUpdateAsync( @@ -849,7 +839,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the description of the IoT hub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginCreateOrUpdateAsync( @@ -885,7 +875,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate( @@ -908,7 +898,7 @@ public SyncPoller, IotHubDescriptionInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate( @@ -1184,7 +1174,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the description of the IoT hub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginUpdateAsync( @@ -1210,7 +1200,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the description of the IoT hub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginUpdateAsync( @@ -1237,7 +1227,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, IotHubDescriptionInner> beginUpdate( @@ -1255,7 +1245,7 @@ public SyncPoller, IotHubDescriptionInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, IotHubDescriptionInner> beginUpdate( @@ -1437,7 +1427,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the description of the IoT hub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginDeleteAsync( @@ -1462,7 +1452,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the description of the IoT hub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, IotHubDescriptionInner> beginDeleteAsync( @@ -1487,7 +1477,7 @@ private PollerFlux, IotHubDescriptionInner> b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, IotHubDescriptionInner> beginDelete( @@ -1504,7 +1494,7 @@ public SyncPoller, IotHubDescriptionInner> be * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, IotHubDescriptionInner> beginDelete( @@ -1670,7 +1660,7 @@ private Mono> listSinglePageAsync(Context * * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1685,7 +1675,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1698,7 +1688,7 @@ private PagedFlux listAsync(Context context) { * * @throws 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) public PagedIterable list() { @@ -1712,7 +1702,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable list(Context context) { @@ -1829,7 +1819,7 @@ private Mono> listByResourceGroupSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1846,7 +1836,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1862,7 +1852,7 @@ private PagedFlux listByResourceGroupAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1877,7 +1867,7 @@ public PagedIterable listByResourceGroup(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1991,14 +1981,7 @@ private Mono> getStatsWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getStatsAsync(String resourceGroupName, String resourceName) { return getStatsWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2155,7 +2138,7 @@ private Mono> getValidSkusSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getValidSkusAsync(String resourceGroupName, String resourceName) { @@ -2173,7 +2156,7 @@ private PagedFlux getValidSkusAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getValidSkusAsync( @@ -2191,7 +2174,7 @@ private PagedFlux getValidSkusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable getValidSkus(String resourceGroupName, String resourceName) { @@ -2207,7 +2190,7 @@ public PagedIterable getValidSkus(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable getValidSkus( @@ -2350,7 +2333,8 @@ private Mono> listEventHubConsumer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listEventHubConsumerGroupsAsync( @@ -2370,7 +2354,8 @@ private PagedFlux listEventHubConsumerGroupsAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listEventHubConsumerGroupsAsync( @@ -2391,7 +2376,8 @@ private PagedFlux listEventHubConsumerGroupsAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listEventHubConsumerGroups( @@ -2410,7 +2396,8 @@ public PagedIterable listEventHubConsumerGroups( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listEventHubConsumerGroups( @@ -2554,14 +2541,7 @@ private Mono> getEventHubConsumerGroupW private Mono getEventHubConsumerGroupAsync( String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { return getEventHubConsumerGroupWithResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2769,14 +2749,7 @@ private Mono createEventHubConsumerGroupAsync( EventHubConsumerGroupBodyDescription consumerGroupBody) { return createEventHubConsumerGroupWithResponseAsync( resourceGroupName, resourceName, eventHubEndpointName, name, consumerGroupBody) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2963,7 +2936,7 @@ private Mono> deleteEventHubConsumerGroupWithResponseAsync( private Mono deleteEventHubConsumerGroupAsync( String resourceGroupName, String resourceName, String eventHubEndpointName, String name) { return deleteEventHubConsumerGroupWithResponseAsync(resourceGroupName, resourceName, eventHubEndpointName, name) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** @@ -3129,7 +3102,7 @@ private Mono> listJobsSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listJobsAsync(String resourceGroupName, String resourceName) { @@ -3148,7 +3121,7 @@ private PagedFlux listJobsAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listJobsAsync(String resourceGroupName, String resourceName, Context context) { @@ -3166,7 +3139,7 @@ private PagedFlux listJobsAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listJobs(String resourceGroupName, String resourceName) { @@ -3183,7 +3156,7 @@ public PagedIterable listJobs(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listJobs(String resourceGroupName, String resourceName, Context context) { @@ -3313,14 +3286,7 @@ private Mono> getJobWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getJobAsync(String resourceGroupName, String resourceName, String jobId) { return getJobWithResponseAsync(resourceGroupName, resourceName, jobId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3481,7 +3447,7 @@ private Mono> getQuotaMetricsSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getQuotaMetricsAsync(String resourceGroupName, String resourceName) { @@ -3499,7 +3465,7 @@ private PagedFlux getQuotaMetricsAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getQuotaMetricsAsync( @@ -3517,7 +3483,7 @@ private PagedFlux getQuotaMetricsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable getQuotaMetrics(String resourceGroupName, String resourceName) { @@ -3533,7 +3499,7 @@ public PagedIterable getQuotaMetrics(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable getQuotaMetrics( @@ -3663,7 +3629,7 @@ private Mono> getEndpointHealthSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getEndpointHealthAsync(String resourceGroupName, String iotHubName) { @@ -3681,7 +3647,7 @@ private PagedFlux getEndpointHealthAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getEndpointHealthAsync( @@ -3699,7 +3665,7 @@ private PagedFlux getEndpointHealthAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable getEndpointHealth(String resourceGroupName, String iotHubName) { @@ -3715,7 +3681,7 @@ public PagedIterable getEndpointHealth(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable getEndpointHealth( @@ -3828,15 +3794,7 @@ private Mono> checkNameAvailabilityWit */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync(OperationInputs operationInputs) { - return checkNameAvailabilityWithResponseAsync(operationInputs) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return checkNameAvailabilityWithResponseAsync(operationInputs).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3994,14 +3952,7 @@ private Mono> testAllRoutesWithResponseAsync( private Mono testAllRoutesAsync( String iotHubName, String resourceGroupName, TestAllRoutesInput input) { return testAllRoutesWithResponseAsync(iotHubName, resourceGroupName, input) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4162,14 +4113,7 @@ private Mono> testRouteWithResponseAsync( private Mono testRouteAsync( String iotHubName, String resourceGroupName, TestRouteInput input) { return testRouteWithResponseAsync(iotHubName, resourceGroupName, input) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4331,7 +4275,7 @@ private Mono> listKey * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listKeysAsync( @@ -4351,7 +4295,7 @@ private PagedFlux listKeysAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listKeysAsync( @@ -4370,7 +4314,7 @@ private PagedFlux listKeysAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listKeys( @@ -4388,7 +4332,7 @@ public PagedIterable listKeys( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable listKeys( @@ -4520,14 +4464,7 @@ private Mono> getKeysForKe private Mono getKeysForKeyNameAsync( String resourceGroupName, String resourceName, String keyName) { return getKeysForKeyNameWithResponseAsync(resourceGroupName, resourceName, keyName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4702,14 +4639,7 @@ private Mono> exportDevicesWithResponseAsync( private Mono exportDevicesAsync( String resourceGroupName, String resourceName, ExportDevicesRequest exportDevicesParameters) { return exportDevicesWithResponseAsync(resourceGroupName, resourceName, exportDevicesParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4887,14 +4817,7 @@ private Mono> importDevicesWithResponseAsync( private Mono importDevicesAsync( String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters) { return importDevicesWithResponseAsync(resourceGroupName, resourceName, importDevicesParameters) - .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/IotHubResourcesImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java index c55731b504d88..7e38b0c8edc41 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubResourcesImpl.java @@ -38,10 +38,9 @@ import com.azure.resourcemanager.iothub.models.TestAllRoutesResult; import com.azure.resourcemanager.iothub.models.TestRouteInput; import com.azure.resourcemanager.iothub.models.TestRouteResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IotHubResourcesImpl implements IotHubResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IotHubResourcesImpl.class); private final IotHubResourcesClient innerClient; @@ -442,7 +441,7 @@ public Response importDevicesWithResponse( public IotHubDescription getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -450,7 +449,7 @@ public IotHubDescription 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))); @@ -461,7 +460,7 @@ public IotHubDescription 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 @@ -469,7 +468,7 @@ public Response getByIdWithResponse(String id, Context contex } 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))); @@ -480,7 +479,7 @@ public Response getByIdWithResponse(String id, Context contex public EventHubConsumerGroupInfo getEventHubConsumerGroupById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -488,14 +487,14 @@ public EventHubConsumerGroupInfo getEventHubConsumerGroupById(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 eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints"); if (eventHubEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -504,7 +503,7 @@ public EventHubConsumerGroupInfo getEventHubConsumerGroupById(String id) { } String name = Utils.getValueFromIdByName(id, "ConsumerGroups"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -519,7 +518,7 @@ public EventHubConsumerGroupInfo getEventHubConsumerGroupById(String id) { public Response getEventHubConsumerGroupByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -527,14 +526,14 @@ public Response getEventHubConsumerGroupByIdWithRespo } 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 eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints"); if (eventHubEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -543,7 +542,7 @@ public Response getEventHubConsumerGroupByIdWithRespo } String name = Utils.getValueFromIdByName(id, "ConsumerGroups"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -556,7 +555,7 @@ public Response getEventHubConsumerGroupByIdWithRespo public IotHubDescription deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -564,7 +563,7 @@ public IotHubDescription 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))); @@ -575,7 +574,7 @@ public IotHubDescription deleteById(String id) { public IotHubDescription deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -583,7 +582,7 @@ public IotHubDescription deleteByIdWithResponse(String id, Context 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))); @@ -594,7 +593,7 @@ public IotHubDescription deleteByIdWithResponse(String id, Context context) { public void deleteEventHubConsumerGroupById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -602,14 +601,14 @@ public void deleteEventHubConsumerGroupById(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 eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints"); if (eventHubEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -618,7 +617,7 @@ public void deleteEventHubConsumerGroupById(String id) { } String name = Utils.getValueFromIdByName(id, "ConsumerGroups"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -632,7 +631,7 @@ public void deleteEventHubConsumerGroupById(String id) { public Response deleteEventHubConsumerGroupByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -640,14 +639,14 @@ public Response deleteEventHubConsumerGroupByIdWithResponse(String id, Con } 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 eventHubEndpointName = Utils.getValueFromIdByName(id, "eventHubEndpoints"); if (eventHubEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -656,7 +655,7 @@ public Response deleteEventHubConsumerGroupByIdWithResponse(String id, Con } String name = Utils.getValueFromIdByName(id, "ConsumerGroups"); if (name == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java index 76ad073934988..bfa5ed49949f4 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.iothub.fluent.IotHubsClient; @@ -34,8 +33,6 @@ /** An instance of this class provides access to all the operations defined in IotHubsClient. */ public final class IotHubsClientImpl implements IotHubsClient { - private final ClientLogger logger = new ClientLogger(IotHubsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final IotHubsService service; @@ -199,7 +196,7 @@ private Mono>> manualFailoverWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginManualFailoverAsync( @@ -224,7 +221,7 @@ private PollerFlux, Void> beginManualFailoverAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginManualFailoverAsync( @@ -248,7 +245,7 @@ private PollerFlux, Void> beginManualFailoverAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, Void> beginManualFailover( @@ -268,7 +265,7 @@ public SyncPoller, Void> beginManualFailover( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, Void> beginManualFailover( diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsImpl.java index 2ee870445f974..29331c09dcc1c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsImpl.java @@ -9,10 +9,9 @@ import com.azure.resourcemanager.iothub.fluent.IotHubsClient; import com.azure.resourcemanager.iothub.models.FailoverInput; import com.azure.resourcemanager.iothub.models.IotHubs; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class IotHubsImpl implements IotHubs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(IotHubsImpl.class); private final IotHubsClient innerClient; diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsClientImpl.java index 84d3035d696e4..0b16511c0b095 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsClientImpl.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.OperationsClient; import com.azure.resourcemanager.iothub.fluent.models.OperationInner; import com.azure.resourcemanager.iothub.models.ErrorDetailsException; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -150,7 +147,7 @@ private Mono> listSinglePageAsync(Context context) * * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -164,7 +161,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -177,7 +174,7 @@ private PagedFlux listAsync(Context context) { * * @throws 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) public PagedIterable list() { @@ -191,7 +188,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public PagedIterable list(Context context) { diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsImpl.java index dcb6e102be616..f000905278153 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.iothub.fluent.models.OperationInner; import com.azure.resourcemanager.iothub.models.Operation; import com.azure.resourcemanager.iothub.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java index 3eb6f8693987c..68e7cbeaa4e38 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsClientImpl.java @@ -24,7 +24,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.iothub.fluent.PrivateEndpointConnectionsClient; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateEndpointConnectionsService service; @@ -238,15 +235,7 @@ private Mono>> listWithResponseAsy */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listAsync(String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response> res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -408,14 +397,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String resourceName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -602,8 +584,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the private endpoint connection of an IotHub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( @@ -635,8 +616,7 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the private endpoint connection of an IotHub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( @@ -669,8 +649,7 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -694,8 +673,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( @@ -927,8 +905,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the private endpoint connection of an IotHub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginDeleteAsync( @@ -955,8 +932,7 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 PollerFlux} for polling of the private endpoint connection of an IotHub. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginDeleteAsync( @@ -983,8 +959,7 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, PrivateEndpointConnectionInner> beginDelete( @@ -1002,8 +977,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) public SyncPoller, PrivateEndpointConnectionInner> beginDelete( diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsImpl.java index 364d3408cb34a..bdabcbe41bf35 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateEndpointConnectionsImpl.java @@ -12,13 +12,12 @@ import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.iothub.models.PrivateEndpointConnection; import com.azure.resourcemanager.iothub.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); private final PrivateEndpointConnectionsClient innerClient; diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsClientImpl.java index 5fe1432eb918f..0db68b19889fe 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsClientImpl.java @@ -20,7 +20,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.PrivateLinkResourcesOperationsClient; import com.azure.resourcemanager.iothub.fluent.models.GroupIdInformationInner; import com.azure.resourcemanager.iothub.fluent.models.PrivateLinkResourcesInner; @@ -29,8 +28,6 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesOperationsClient. */ public final class PrivateLinkResourcesOperationsClientImpl implements PrivateLinkResourcesOperationsClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesOperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateLinkResourcesOperationsService service; @@ -199,15 +196,7 @@ private Mono> listWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String resourceName) { - return listWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return listWithResponseAsync(resourceGroupName, resourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -362,14 +351,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String resourceName, String groupId) { return getWithResponseAsync(resourceGroupName, resourceName, groupId) - .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/PrivateLinkResourcesOperationsImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsImpl.java index aa81656c3702f..b3bd0bf5ad1e5 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/PrivateLinkResourcesOperationsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.iothub.models.GroupIdInformation; import com.azure.resourcemanager.iothub.models.PrivateLinkResources; import com.azure.resourcemanager.iothub.models.PrivateLinkResourcesOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateLinkResourcesOperationsImpl implements PrivateLinkResourcesOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesOperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesOperationsImpl.class); private final PrivateLinkResourcesOperationsClient innerClient; diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsClientImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsClientImpl.java index bc9286005e0e6..372f41335e9bd 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsClientImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsClientImpl.java @@ -20,7 +20,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.ResourceProviderCommonsClient; import com.azure.resourcemanager.iothub.fluent.models.UserSubscriptionQuotaListResultInner; import com.azure.resourcemanager.iothub.models.ErrorDetailsException; @@ -28,8 +27,6 @@ /** An instance of this class provides access to all the operations defined in ResourceProviderCommonsClient. */ public final class ResourceProviderCommonsClientImpl implements ResourceProviderCommonsClient { - private final ClientLogger logger = new ClientLogger(ResourceProviderCommonsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceProviderCommonsService service; @@ -148,15 +145,7 @@ private Mono> getSubscriptionQuot */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getSubscriptionQuotaAsync() { - return getSubscriptionQuotaWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getSubscriptionQuotaWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsImpl.java index baa39c4baf87c..34c7ec7aa17de 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsImpl.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/ResourceProviderCommonsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.iothub.fluent.models.UserSubscriptionQuotaListResultInner; import com.azure.resourcemanager.iothub.models.ResourceProviderCommons; import com.azure.resourcemanager.iothub.models.UserSubscriptionQuotaListResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceProviderCommonsImpl implements ResourceProviderCommons { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProviderCommonsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceProviderCommonsImpl.class); private final ResourceProviderCommonsClient innerClient; diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java index c6e8c95006bcb..f09830f67df07 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmIdentity.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.iothub.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** The ArmIdentity model. */ @Fluent public class ArmIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmIdentity.class); - /* * Principal Id */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java index 8ce8ce6148071..0f3168890d73a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ArmUserIdentity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** The ArmUserIdentity model. */ @Immutable public class ArmUserIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmUserIdentity.class); - /* * The principalId property. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/AuthenticationType.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/AuthenticationType.java index 0e2183e55c395..773cc5f4b167a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/AuthenticationType.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/AuthenticationType.java @@ -27,7 +27,11 @@ public static AuthenticationType fromString(String name) { return fromString(name, AuthenticationType.class); } - /** @return known AuthenticationType values. */ + /** + * Gets known AuthenticationType values. + * + * @return known AuthenticationType values. + */ public static Collection values() { return values(AuthenticationType.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Capabilities.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Capabilities.java index 747e48444bd3e..dc29ac63f9ffd 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Capabilities.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Capabilities.java @@ -27,7 +27,11 @@ public static Capabilities fromString(String name) { return fromString(name, Capabilities.class); } - /** @return known Capabilities values. */ + /** + * Gets known Capabilities values. + * + * @return known Capabilities values. + */ public static Collection values() { return values(Capabilities.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java index 71f56c61ddd8b..2c319d346bb9b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateDescription.java @@ -44,6 +44,13 @@ public interface CertificateDescription { */ String etag(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner object. * diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateProperties.java index df4a92995985d..8bff7fa6b4d2a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateProperties.java @@ -6,16 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.DateTimeRfc1123; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The description of an X509 CA Certificate. */ @Fluent public final class CertificateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateProperties.class); - /* * The certificate's subject name. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificatePropertiesWithNonce.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificatePropertiesWithNonce.java index d806712d99969..932eb4456b467 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificatePropertiesWithNonce.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificatePropertiesWithNonce.java @@ -6,16 +6,12 @@ import com.azure.core.annotation.Immutable; import com.azure.core.util.DateTimeRfc1123; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** The description of an X509 CA Certificate including the challenge nonce issued for the Proof-Of-Possession flow. */ @Immutable public final class CertificatePropertiesWithNonce { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificatePropertiesWithNonce.class); - /* * The certificate's subject name. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateVerificationDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateVerificationDescription.java index 22f1975e95ed0..ccc6f42494838 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateVerificationDescription.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CertificateVerificationDescription.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** The JSON-serialized leaf certificate. */ @Fluent public final class CertificateVerificationDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateVerificationDescription.class); - /* * base-64 representation of X509 certificate .cer file or just .pem file * content. diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CloudToDeviceProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CloudToDeviceProperties.java index 06b3dafbf2db3..f8275425b35db 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CloudToDeviceProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/CloudToDeviceProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.iothub.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.time.Duration; /** The IoT hub cloud-to-device messaging properties. */ @Fluent public final class CloudToDeviceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CloudToDeviceProperties.class); - /* * The max delivery count for cloud-to-device messages in the device queue. * See: diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java index 4731ff0dc046a..b220733de8a7c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/DefaultAction.java @@ -27,7 +27,11 @@ public static DefaultAction fromString(String name) { return fromString(name, DefaultAction.class); } - /** @return known DefaultAction values. */ + /** + * Gets known DefaultAction values. + * + * @return known DefaultAction values. + */ public static Collection values() { return values(DefaultAction.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthDataListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthDataListResult.java index 5bf5ac5620277..2a5fbe87e3fbe 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthDataListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthDataListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The JSON-serialized array of EndpointHealthData objects with a next link. */ @Fluent public final class EndpointHealthDataListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointHealthDataListResult.class); - /* * JSON-serialized array of Endpoint health data */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java index 29f6463f85ddc..73a2b50e4fae9 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EndpointHealthStatus.java @@ -36,7 +36,11 @@ public static EndpointHealthStatus fromString(String name) { return fromString(name, EndpointHealthStatus.class); } - /** @return known EndpointHealthStatus values. */ + /** + * Gets known EndpointHealthStatus values. + * + * @return known EndpointHealthStatus values. + */ public static Collection values() { return values(EndpointHealthStatus.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EnrichmentProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EnrichmentProperties.java index 7e4ddafb1ab8d..4353a65227e28 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EnrichmentProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EnrichmentProperties.java @@ -6,15 +6,12 @@ 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 properties of an enrichment that your IoT hub applies to messages delivered to endpoints. */ @Fluent public final class EnrichmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnrichmentProperties.class); - /* * The key or name for the enrichment property. */ @@ -101,20 +98,22 @@ public EnrichmentProperties withEndpointNames(List endpointNames) { */ public void validate() { if (key() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property key in model EnrichmentProperties")); } if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model EnrichmentProperties")); } if (endpointNames() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property endpointNames in model EnrichmentProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(EnrichmentProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java index 32cb77dcce3cf..5b5380289f699 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ErrorDetails.java @@ -6,15 +6,11 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Error details. */ @Immutable public final class ErrorDetails extends ManagementError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ErrorDetails.class); - /* * The HTTP status code. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupBodyDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupBodyDescription.java index 12d1a5fade05d..ce5cc0baf68a8 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupBodyDescription.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupBodyDescription.java @@ -6,14 +6,11 @@ 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; /** The EventHub consumer group. */ @Fluent public final class EventHubConsumerGroupBodyDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConsumerGroupBodyDescription.class); - /* * The EventHub consumer group name. */ @@ -47,7 +44,7 @@ public EventHubConsumerGroupBodyDescription withProperties(EventHubConsumerGroup */ public void validate() { if (properties() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property properties in model EventHubConsumerGroupBodyDescription")); @@ -55,4 +52,6 @@ public void validate() { properties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(EventHubConsumerGroupBodyDescription.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java index dbf7c7fcb7fea..eebf1977ebc8b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupName.java @@ -6,14 +6,11 @@ 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; /** The EventHub consumer group name. */ @Fluent public final class EventHubConsumerGroupName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConsumerGroupName.class); - /* * EventHub consumer group name */ @@ -47,9 +44,11 @@ public EventHubConsumerGroupName withName(String name) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model EventHubConsumerGroupName")); } } + + private static final ClientLogger LOGGER = new ClientLogger(EventHubConsumerGroupName.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupsListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupsListResult.java index 5b3e83021bc75..98ad18da5ff12 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupsListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubConsumerGroupsListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The JSON-serialized array of Event Hub-compatible consumer group names with a next link. */ @Fluent public final class EventHubConsumerGroupsListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConsumerGroupsListResult.class); - /* * List of consumer groups objects */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubProperties.java index d1d786e80b1ed..9d4d776eb325c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/EventHubProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.iothub.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 properties of the provisioned Event Hub-compatible endpoint used by the IoT hub. */ @Fluent public final class EventHubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubProperties.class); - /* * The retention time for device-to-cloud messages in days. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java index 15cb7939bc71b..abe5c058524a7 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ExportDevicesRequest.java @@ -6,14 +6,11 @@ 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; /** Use to provide parameters when requesting an export of all devices in the IoT hub. */ @Fluent public final class ExportDevicesRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ExportDevicesRequest.class); - /* * The export blob container URI. */ @@ -214,7 +211,7 @@ public ExportDevicesRequest withConfigurationsBlobName(String configurationsBlob */ public void validate() { if (exportBlobContainerUri() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property exportBlobContainerUri in model ExportDevicesRequest")); @@ -223,4 +220,6 @@ public void validate() { identity().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ExportDevicesRequest.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FailoverInput.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FailoverInput.java index 06c760ae618f0..ca0a620dbd794 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FailoverInput.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FailoverInput.java @@ -6,14 +6,11 @@ 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; /** Use to provide failover region when requesting manual Failover for a hub. */ @Fluent public final class FailoverInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FailoverInput.class); - /* * Region the hub will be failed over to */ @@ -47,9 +44,11 @@ public FailoverInput withFailoverRegion(String failoverRegion) { */ public void validate() { if (failoverRegion() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property failoverRegion in model FailoverInput")); } } + + private static final ClientLogger LOGGER = new ClientLogger(FailoverInput.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FallbackRouteProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FallbackRouteProperties.java index 8b0cbc19c368d..c2c365c53f304 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FallbackRouteProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FallbackRouteProperties.java @@ -6,7 +6,6 @@ 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; @@ -15,8 +14,6 @@ */ @Fluent public final class FallbackRouteProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FallbackRouteProperties.class); - /* * The name of the route. The name can only include alphanumeric * characters, periods, underscores, hyphens, has a maximum length of 64 @@ -169,15 +166,17 @@ public FallbackRouteProperties withIsEnabled(boolean isEnabled) { */ public void validate() { if (source() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property source in model FallbackRouteProperties")); } if (endpointNames() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property endpointNames in model FallbackRouteProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(FallbackRouteProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FeedbackProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FeedbackProperties.java index 30de8180f6e2b..0218ca1a60f2e 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FeedbackProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/FeedbackProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.iothub.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.time.Duration; /** The properties of the feedback queue for cloud-to-device messages. */ @Fluent public final class FeedbackProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FeedbackProperties.class); - /* * The lock duration for the feedback queue. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages. diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/GroupIdInformationProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/GroupIdInformationProperties.java index 797a9784c04b6..aeecc813154ed 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/GroupIdInformationProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/GroupIdInformationProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.iothub.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 properties for a group information object. */ @Fluent public final class GroupIdInformationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GroupIdInformationProperties.class); - /* * The group id */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java index 90956e1d595f1..6b25f72128583 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ImportDevicesRequest.java @@ -6,14 +6,11 @@ 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; /** Use to provide parameters when requesting an import of all devices in the hub. */ @Fluent public final class ImportDevicesRequest { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImportDevicesRequest.class); - /* * The input blob container URI. */ @@ -236,13 +233,13 @@ public ImportDevicesRequest withConfigurationsBlobName(String configurationsBlob */ public void validate() { if (inputBlobContainerUri() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property inputBlobContainerUri in model ImportDevicesRequest")); } if (outputBlobContainerUri() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property outputBlobContainerUri in model ImportDevicesRequest")); @@ -251,4 +248,6 @@ public void validate() { identity().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ImportDevicesRequest.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubCapacity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubCapacity.java index 3bbf578a85c61..7593c3e437b9b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubCapacity.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubCapacity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** IoT Hub capacity information. */ @Immutable public final class IotHubCapacity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubCapacity.class); - /* * The minimum number of units. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java index 19993451411fd..0967bf45bffb4 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescription.java @@ -99,6 +99,13 @@ public interface IotHubDescription { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner object. * @@ -296,7 +303,7 @@ interface WithTags { * @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}. */ PagedIterable listKeys(); @@ -309,7 +316,7 @@ interface WithTags { * @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}. */ PagedIterable listKeys(Context context); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescriptionListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescriptionListResult.java index ea73613601856..5f26f87b44686 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescriptionListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubDescriptionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The JSON-serialized array of IotHubDescription objects with a next link. */ @Fluent public final class IotHubDescriptionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubDescriptionListResult.class); - /* * The array of IotHubDescription objects. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubLocationDescription.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubLocationDescription.java index b972ec0d8cb05..0fa64364f0b0c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubLocationDescription.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubLocationDescription.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Public representation of one of the locations where a resource is provisioned. */ @Fluent public final class IotHubLocationDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubLocationDescription.class); - /* * The name of the Azure region */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java index bfa963963c2f2..977c5a0b910aa 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubProperties.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.iothub.fluent.models.SharedAccessSignatureAuthorizationRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ /** The properties of an IoT hub. */ @Fluent public final class IotHubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubProperties.class); - /* * The shared access policies you can use to secure a connection to the IoT * hub. diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubQuotaMetricInfoListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubQuotaMetricInfoListResult.java index 726b2e0552479..fd3c10602c39a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubQuotaMetricInfoListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubQuotaMetricInfoListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.IotHubQuotaMetricInfoInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. */ @Fluent public final class IotHubQuotaMetricInfoListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubQuotaMetricInfoListResult.class); - /* * The array of quota metrics objects. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubReplicaRoleType.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubReplicaRoleType.java index e20d1180a8be7..92f8c73c1979e 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubReplicaRoleType.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubReplicaRoleType.java @@ -27,7 +27,11 @@ public static IotHubReplicaRoleType fromString(String name) { return fromString(name, IotHubReplicaRoleType.class); } - /** @return known IotHubReplicaRoleType values. */ + /** + * Gets known IotHubReplicaRoleType values. + * + * @return known IotHubReplicaRoleType values. + */ public static Collection values() { return values(IotHubReplicaRoleType.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java index 28ca1679a52f5..d5557eacdf2d0 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubResources.java @@ -71,7 +71,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 all the IoT hubs in a subscription. + * @return all the IoT hubs in a subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -83,7 +83,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 all the IoT hubs in a subscription. + * @return all the IoT hubs in a subscription as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); @@ -95,7 +95,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 all the IoT hubs in a resource group. + * @return all the IoT hubs in a resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -108,7 +108,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 all the IoT hubs in a resource group. + * @return all the IoT hubs in a resource group as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -148,7 +148,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 list of valid SKUs for an IoT hub. + * @return the list of valid SKUs for an IoT hub as paginated response with {@link PagedIterable}. */ PagedIterable getValidSkus(String resourceGroupName, String resourceName); @@ -162,7 +162,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 list of valid SKUs for an IoT hub. + * @return the list of valid SKUs for an IoT hub as paginated response with {@link PagedIterable}. */ PagedIterable getValidSkus(String resourceGroupName, String resourceName, Context context); @@ -176,7 +176,8 @@ 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 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}. */ PagedIterable listEventHubConsumerGroups( String resourceGroupName, String resourceName, String eventHubEndpointName); @@ -192,7 +193,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}. */ PagedIterable listEventHubConsumerGroups( String resourceGroupName, String resourceName, String eventHubEndpointName, Context context); @@ -273,7 +275,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}. */ PagedIterable listJobs(String resourceGroupName, String resourceName); @@ -288,7 +290,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}. */ PagedIterable listJobs(String resourceGroupName, String resourceName, Context context); @@ -333,7 +335,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}. */ PagedIterable getQuotaMetrics(String resourceGroupName, String resourceName); @@ -347,7 +349,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}. */ PagedIterable getQuotaMetrics( String resourceGroupName, String resourceName, Context context); @@ -361,7 +363,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}. */ PagedIterable getEndpointHealth(String resourceGroupName, String iotHubName); @@ -375,7 +377,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}. */ PagedIterable getEndpointHealth(String resourceGroupName, String iotHubName, Context context); @@ -477,7 +479,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}. */ PagedIterable listKeys(String resourceGroupName, String resourceName); @@ -492,7 +494,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}. */ PagedIterable listKeys( String resourceGroupName, String resourceName, Context context); diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSku.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSku.java index 4ce828735e8f4..17921c2fff7ec 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSku.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSku.java @@ -42,7 +42,11 @@ public static IotHubSku fromString(String name) { return fromString(name, IotHubSku.class); } - /** @return known IotHubSku values. */ + /** + * Gets known IotHubSku values. + * + * @return known IotHubSku values. + */ public static Collection values() { return values(IotHubSku.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuDescriptionListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuDescriptionListResult.java index 6fa6f0569cfca..be242495174cc 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuDescriptionListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuDescriptionListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.IotHubSkuDescriptionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The JSON-serialized array of IotHubSkuDescription objects with a next link. */ @Fluent public final class IotHubSkuDescriptionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubSkuDescriptionListResult.class); - /* * The array of IotHubSkuDescription. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuInfo.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuInfo.java index 565ca11e451e5..c10197f7e7c6c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuInfo.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IotHubSkuInfo.java @@ -6,14 +6,11 @@ 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; /** Information about the SKU of the IoT hub. */ @Fluent public final class IotHubSkuInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubSkuInfo.class); - /* * The name of the SKU. */ @@ -91,9 +88,11 @@ public IotHubSkuInfo withCapacity(Long capacity) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model IotHubSkuInfo")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IotHubSkuInfo.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpFilterRule.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpFilterRule.java index dab0c96805860..17076377a55b7 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpFilterRule.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/IpFilterRule.java @@ -6,14 +6,11 @@ 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; /** The IP filter rules for the IoT hub. */ @Fluent public final class IpFilterRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpFilterRule.class); - /* * The name of the IP filter rule. */ @@ -100,19 +97,21 @@ public IpFilterRule withIpMask(String ipMask) { */ public void validate() { if (filterName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property filterName in model IpFilterRule")); } if (action() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property action in model IpFilterRule")); } if (ipMask() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property ipMask in model IpFilterRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IpFilterRule.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobResponseListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobResponseListResult.java index 5cb59afe7a7c5..7afc6d7bee45d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobResponseListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobResponseListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.JobResponseInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The JSON-serialized array of JobResponse objects with a next link. */ @Fluent public final class JobResponseListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(JobResponseListResult.class); - /* * The array of JobResponse objects. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobType.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobType.java index 566e3488e8578..025da48e84bc1 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobType.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/JobType.java @@ -51,7 +51,11 @@ public static JobType fromString(String name) { return fromString(name, JobType.class); } - /** @return known JobType values. */ + /** + * Gets known JobType values. + * + * @return known JobType values. + */ public static Collection values() { return values(JobType.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java index 1ccf0db4f1f9d..9a1706f0fddeb 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/ManagedIdentity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** The properties of the Managed identity. */ @Fluent public class ManagedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentity.class); - /* * The user assigned identity. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MatchedRoute.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MatchedRoute.java index ae87e959e2dfa..86c2bf096b44c 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MatchedRoute.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MatchedRoute.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Routes that matched. */ @Fluent public final class MatchedRoute { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MatchedRoute.class); - /* * Properties of routes that matched */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MessagingEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MessagingEndpointProperties.java index 2ffb5cb3995ce..40e1155e8bd2b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MessagingEndpointProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/MessagingEndpointProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.iothub.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.time.Duration; /** The properties of the messaging endpoints used by this IoT hub. */ @Fluent public final class MessagingEndpointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MessagingEndpointProperties.class); - /* * The lock duration. See: * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload. diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Name.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Name.java index d2a207582c131..8f9b4261c6d95 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Name.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Name.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Name of Iot Hub type. */ @Fluent public final class Name { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Name.class); - /* * IotHub type */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java index 1f4cf94b56bac..2d83303ba9b65 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleIpAction.java @@ -24,7 +24,11 @@ public static NetworkRuleIpAction fromString(String name) { return fromString(name, NetworkRuleIpAction.class); } - /** @return known NetworkRuleIpAction values. */ + /** + * Gets known NetworkRuleIpAction values. + * + * @return known NetworkRuleIpAction values. + */ public static Collection values() { return values(NetworkRuleIpAction.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java index 420a12f6ab9fb..3b0b4503f6481 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetIpRule.java @@ -6,14 +6,11 @@ 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; /** IP Rule to be applied as part of Network Rule Set. */ @Fluent public final class NetworkRuleSetIpRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSetIpRule.class); - /* * Name of the IP filter rule. */ @@ -100,14 +97,16 @@ public NetworkRuleSetIpRule withIpMask(String ipMask) { */ public void validate() { if (filterName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property filterName in model NetworkRuleSetIpRule")); } if (ipMask() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property ipMask in model NetworkRuleSetIpRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkRuleSetIpRule.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java index 7121e4d7c4d00..8c0c8cc26e7bb 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/NetworkRuleSetProperties.java @@ -6,15 +6,12 @@ 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; /** Network Rule Set Properties of IotHub. */ @Fluent public final class NetworkRuleSetProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSetProperties.class); - /* * Default Action for Network Rule Set */ @@ -103,7 +100,7 @@ public NetworkRuleSetProperties withIpRules(List ipRules) */ public void validate() { if (ipRules() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property ipRules in model NetworkRuleSetProperties")); @@ -111,4 +108,6 @@ public void validate() { ipRules().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkRuleSetProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationDisplay.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationDisplay.java index 2f853034b9591..3c5633977ff86 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationDisplay.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** The object that represents the operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Service provider: Microsoft Devices */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationInputs.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationInputs.java index 6ac998cf03157..9492b03a654ee 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationInputs.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationInputs.java @@ -6,14 +6,11 @@ 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; /** Input values. */ @Fluent public final class OperationInputs { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInputs.class); - /* * The name of the IoT hub to check. */ @@ -47,9 +44,11 @@ public OperationInputs withName(String name) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model OperationInputs")); } } + + private static final ClientLogger LOGGER = new ClientLogger(OperationInputs.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationListResult.java index 34cd8e8df472d..4ee10f0b901ea 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/OperationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of IoT Hub operations supported by the Microsoft.Devices resource * provider. diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Operations.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Operations.java index e98e0d01a2d62..8fa75ea5e0773 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Operations.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/Operations.java @@ -15,7 +15,7 @@ public interface Operations { * @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}. */ PagedIterable list(); @@ -27,7 +27,7 @@ public interface Operations { * @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}. */ PagedIterable list(Context context); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpoint.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpoint.java index b0e77d065aea2..208001d2fc8e5 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpoint.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpoint.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** The private endpoint property of a private endpoint connection. */ @Immutable public final class PrivateEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); - /* * The resource identifier. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpointConnectionProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpointConnectionProperties.java index 668c980a2e633..585a2e72b586a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpointConnectionProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateEndpointConnectionProperties.java @@ -6,14 +6,11 @@ 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; /** The properties of a private endpoint connection. */ @Fluent public final class PrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); - /* * The private endpoint property of a private endpoint connection */ @@ -77,7 +74,7 @@ public void validate() { privateEndpoint().validate(); } if (privateLinkServiceConnectionState() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property privateLinkServiceConnectionState in model" @@ -86,4 +83,6 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionState.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionState.java index 26044dc0415a9..43d671d7fd888 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionState.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionState.java @@ -6,14 +6,11 @@ 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; /** The current state of a private endpoint connection. */ @Fluent public final class PrivateLinkServiceConnectionState { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); - /* * The status of a private endpoint connection */ @@ -99,16 +96,18 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi */ public void validate() { if (status() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property status in model PrivateLinkServiceConnectionState")); } if (description() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property description in model PrivateLinkServiceConnectionState")); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkServiceConnectionState.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionStatus.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionStatus.java index 9a7a9e618533b..ea7260518fe45 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionStatus.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PrivateLinkServiceConnectionStatus.java @@ -33,7 +33,11 @@ public static PrivateLinkServiceConnectionStatus fromString(String name) { return fromString(name, PrivateLinkServiceConnectionStatus.class); } - /** @return known PrivateLinkServiceConnectionStatus values. */ + /** + * Gets known PrivateLinkServiceConnectionStatus values. + * + * @return known PrivateLinkServiceConnectionStatus values. + */ public static Collection values() { return values(PrivateLinkServiceConnectionStatus.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PublicNetworkAccess.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PublicNetworkAccess.java index 337473236a4f3..2cb526a24b70d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PublicNetworkAccess.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/PublicNetworkAccess.java @@ -27,7 +27,11 @@ public static PublicNetworkAccess fromString(String name) { return fromString(name, PublicNetworkAccess.class); } - /** @return known PublicNetworkAccess values. */ + /** + * Gets known PublicNetworkAccess values. + * + * @return known PublicNetworkAccess values. + */ public static Collection values() { return values(PublicNetworkAccess.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteCompilationError.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteCompilationError.java index 40097484499ae..32d0640a8db9d 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteCompilationError.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteCompilationError.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Compilation error when evaluating route. */ @Fluent public final class RouteCompilationError { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RouteCompilationError.class); - /* * Route error message */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorPosition.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorPosition.java index 2fff04210d8c3..58c43833be88a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorPosition.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorPosition.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Position where the route error happened. */ @Fluent public final class RouteErrorPosition { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RouteErrorPosition.class); - /* * Line where the route error happened */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorRange.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorRange.java index ffb314cf5039a..badcc3a39a7eb 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorRange.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorRange.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Range of route errors. */ @Fluent public final class RouteErrorRange { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RouteErrorRange.class); - /* * Start where the route error happened */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorSeverity.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorSeverity.java index 79a8835ddac22..05a198a0f92cb 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorSeverity.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteErrorSeverity.java @@ -27,7 +27,11 @@ public static RouteErrorSeverity fromString(String name) { return fromString(name, RouteErrorSeverity.class); } - /** @return known RouteErrorSeverity values. */ + /** + * Gets known RouteErrorSeverity values. + * + * @return known RouteErrorSeverity values. + */ public static Collection values() { return values(RouteErrorSeverity.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteProperties.java index 55994f08e91b4..723b851c1db38 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RouteProperties.java @@ -6,15 +6,12 @@ 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 properties of a routing rule that your IoT hub uses to route messages to endpoints. */ @Fluent public final class RouteProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RouteProperties.class); - /* * The name of the route. The name can only include alphanumeric * characters, periods, underscores, hyphens, has a maximum length of 64 @@ -167,19 +164,21 @@ public RouteProperties withIsEnabled(boolean isEnabled) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model RouteProperties")); } if (source() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property source in model RouteProperties")); } if (endpointNames() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property endpointNames in model RouteProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RouteProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java index f93098ac15385..cac5e32a76538 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEndpoints.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.iothub.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; @@ -17,8 +15,6 @@ */ @Fluent public final class RoutingEndpoints { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingEndpoints.class); - /* * The list of Service Bus queue endpoints that IoT hub routes the messages * to, based on the routing rules. diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java index 235e904a445c5..54482c430441f 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingEventHubProperties.java @@ -6,14 +6,11 @@ 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; /** The properties related to an event hub endpoint. */ @Fluent public final class RoutingEventHubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingEventHubProperties.class); - /* * Id of the event hub endpoint */ @@ -266,9 +263,11 @@ public void validate() { identity().validate(); } if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model RoutingEventHubProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RoutingEventHubProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java index a3d2d00f01124..05ebe0e4174c2 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingMessage.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.iothub.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Routing message. */ @Fluent public final class RoutingMessage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingMessage.class); - /* * Body of routing message */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java index 6f3799c460459..41321c49c7eaa 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.iothub.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; @@ -16,8 +14,6 @@ */ @Fluent public final class RoutingProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingProperties.class); - /* * The properties related to the custom endpoints to which your IoT hub * routes messages based on the routing rules. A maximum of 10 custom diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java index 3736dc3a2a266..70e28abd9c599 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusQueueEndpointProperties.java @@ -6,14 +6,11 @@ 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; /** The properties related to service bus queue endpoint types. */ @Fluent public final class RoutingServiceBusQueueEndpointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingServiceBusQueueEndpointProperties.class); - /* * Id of the service bus queue endpoint */ @@ -269,10 +266,12 @@ public void validate() { identity().validate(); } if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model RoutingServiceBusQueueEndpointProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RoutingServiceBusQueueEndpointProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java index 190b697a5b820..e29c39f4a504f 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingServiceBusTopicEndpointProperties.java @@ -6,14 +6,11 @@ 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; /** The properties related to service bus topic endpoint types. */ @Fluent public final class RoutingServiceBusTopicEndpointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingServiceBusTopicEndpointProperties.class); - /* * Id of the service bus topic endpoint */ @@ -269,10 +266,12 @@ public void validate() { identity().validate(); } if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model RoutingServiceBusTopicEndpointProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RoutingServiceBusTopicEndpointProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java index 666b10fecd934..ab8a4e7cf3b5b 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingSource.java @@ -39,7 +39,11 @@ public static RoutingSource fromString(String name) { return fromString(name, RoutingSource.class); } - /** @return known RoutingSource values. */ + /** + * Gets known RoutingSource values. + * + * @return known RoutingSource values. + */ public static Collection values() { return values(RoutingSource.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java index 1221f96c48dd2..c51056b06c441 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerProperties.java @@ -6,14 +6,11 @@ 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; /** The properties related to a storage container endpoint. */ @Fluent public final class RoutingStorageContainerProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingStorageContainerProperties.class); - /* * Id of the storage container endpoint */ @@ -384,16 +381,18 @@ public void validate() { identity().validate(); } if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property name in model RoutingStorageContainerProperties")); } if (containerName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property containerName in model RoutingStorageContainerProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RoutingStorageContainerProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerPropertiesEncoding.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerPropertiesEncoding.java index 8948c5e4c85cd..15291378a32f7 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerPropertiesEncoding.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingStorageContainerPropertiesEncoding.java @@ -31,7 +31,11 @@ public static RoutingStorageContainerPropertiesEncoding fromString(String name) return fromString(name, RoutingStorageContainerPropertiesEncoding.class); } - /** @return known RoutingStorageContainerPropertiesEncoding values. */ + /** + * Gets known RoutingStorageContainerPropertiesEncoding values. + * + * @return known RoutingStorageContainerPropertiesEncoding values. + */ public static Collection values() { return values(RoutingStorageContainerPropertiesEncoding.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwin.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwin.java index 3f353d6b29ef9..5d14694e9bec3 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwin.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwin.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Twin reference input parameter. This is an optional parameter. */ @Fluent public final class RoutingTwin { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingTwin.class); - /* * Twin Tags */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwinProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwinProperties.java index 768c19f1f4fc4..c9b0ca0006723 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwinProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/RoutingTwinProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** The RoutingTwinProperties model. */ @Fluent public final class RoutingTwinProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RoutingTwinProperties.class); - /* * Twin desired properties */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/SharedAccessSignatureAuthorizationRuleListResult.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/SharedAccessSignatureAuthorizationRuleListResult.java index 36a3d1d9fe44c..763f83f7c0c9e 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/SharedAccessSignatureAuthorizationRuleListResult.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/SharedAccessSignatureAuthorizationRuleListResult.java @@ -5,18 +5,13 @@ package com.azure.resourcemanager.iothub.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.iothub.fluent.models.SharedAccessSignatureAuthorizationRuleInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of shared access policies with a next link. */ @Fluent public final class SharedAccessSignatureAuthorizationRuleListResult { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SharedAccessSignatureAuthorizationRuleListResult.class); - /* * The list of shared access policies. */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java index bc00003165548..ef94824425889 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/StorageEndpointProperties.java @@ -6,15 +6,12 @@ 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.time.Duration; /** The properties of the Azure Storage endpoint for file upload. */ @Fluent public final class StorageEndpointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageEndpointProperties.class); - /* * The period of time for which the SAS URI generated by IoT Hub for file * upload is valid. See: @@ -168,13 +165,13 @@ public StorageEndpointProperties withIdentity(ManagedIdentity identity) { */ public void validate() { if (connectionString() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property connectionString in model StorageEndpointProperties")); } if (containerName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property containerName in model StorageEndpointProperties")); @@ -183,4 +180,6 @@ public void validate() { identity().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(StorageEndpointProperties.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java index 77f43a06514c5..b4182756354ef 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TagsResource.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.iothub.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.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** A container holding only the Tags for a resource, allowing the user to update the tags on an IoT Hub instance. */ @Fluent public final class TagsResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TagsResource.class); - /* * Resource tags */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestAllRoutesInput.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestAllRoutesInput.java index bc114025d07a4..4cf94aa381c63 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestAllRoutesInput.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestAllRoutesInput.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** Input for testing all routes. */ @Fluent public final class TestAllRoutesInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TestAllRoutesInput.class); - /* * Routing source */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestResultStatus.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestResultStatus.java index 3637821205b46..21ae5ab545bf5 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestResultStatus.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestResultStatus.java @@ -30,7 +30,11 @@ public static TestResultStatus fromString(String name) { return fromString(name, TestResultStatus.class); } - /** @return known TestResultStatus values. */ + /** + * Gets known TestResultStatus values. + * + * @return known TestResultStatus values. + */ public static Collection values() { return values(TestResultStatus.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteInput.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteInput.java index b9c5e282361cc..0d428cf8f446a 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteInput.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteInput.java @@ -6,14 +6,11 @@ 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; /** Input for testing route. */ @Fluent public final class TestRouteInput { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TestRouteInput.class); - /* * Routing message */ @@ -102,7 +99,7 @@ public void validate() { message().validate(); } if (route() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property route in model TestRouteInput")); } else { @@ -112,4 +109,6 @@ public void validate() { twin().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(TestRouteInput.class); } diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteResultDetails.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteResultDetails.java index d620c2a4ea786..64fdab8f0dd29 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteResultDetails.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/TestRouteResultDetails.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.iothub.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; /** Detailed result of testing a route. */ @Fluent public final class TestRouteResultDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TestRouteResultDetails.class); - /* * JSON-serialized list of route compilation errors */ diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/UserSubscriptionQuota.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/UserSubscriptionQuota.java index 5651eef095929..3d2abc6cd07f8 100644 --- a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/UserSubscriptionQuota.java +++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/models/UserSubscriptionQuota.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.iothub.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; /** User subscription quota response. */ @Fluent public final class UserSubscriptionQuota { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserSubscriptionQuota.class); - /* * IotHub type id */