diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 5b180d642ed04..9f668997db9db 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -187,6 +187,7 @@ com.azure.resourcemanager:azure-resourcemanager-recoveryservices;1.0.0-beta.1;1.
com.azure.resourcemanager:azure-resourcemanager-kusto;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-loganalytics;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-iothub;1.0.0-beta.1;1.0.0-beta.1
com.microsoft:microsoft-opentelemetry-exporter-azuremonitor;1.0.0-beta.1;1.0.0-beta.2
diff --git a/pom.xml b/pom.xml
index b80dac967d8f2..fbf768f72640f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,7 @@
sdk/formrecognizersdk/hdinsightsdk/identity
+ sdk/iothubsdk/keyvaultsdk/kustosdk/loganalytics
diff --git a/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
new file mode 100644
index 0000000000000..27ca1fcdf74f7
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-01-05)
+
+- 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-2020-08-31. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
\ No newline at end of file
diff --git a/sdk/iothub/azure-resourcemanager-iothub/README.md b/sdk/iothub/azure-resourcemanager-iothub/README.md
new file mode 100644
index 0000000000000..3470ce4591235
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/README.md
@@ -0,0 +1,83 @@
+# Azure Resource Manager IotHub client library for Java
+
+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-2020-08-31. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-iothub;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-iothub
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+IotHubManager manager = IotHubManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/master/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/iothub/azure-resourcemanager-iothub/pom.xml b/sdk/iothub/azure-resourcemanager-iothub/pom.xml
new file mode 100644
index 0000000000000..d2f86bb22593c
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/pom.xml
@@ -0,0 +1,62 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-iothub
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for IotHub Management
+ 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-2020-08-31. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core-management
+ 1.0.0
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+
+
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
new file mode 100644
index 0000000000000..7b7fbdc8505ad
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/IotHubManager.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+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.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.iothub.fluent.IotHubClient;
+import com.azure.resourcemanager.iothub.implementation.CertificatesImpl;
+import com.azure.resourcemanager.iothub.implementation.IotHubClientBuilder;
+import com.azure.resourcemanager.iothub.implementation.IotHubResourcesImpl;
+import com.azure.resourcemanager.iothub.implementation.IotHubsImpl;
+import com.azure.resourcemanager.iothub.implementation.OperationsImpl;
+import com.azure.resourcemanager.iothub.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.iothub.implementation.PrivateLinkResourcesOperationsImpl;
+import com.azure.resourcemanager.iothub.implementation.ResourceProviderCommonsImpl;
+import com.azure.resourcemanager.iothub.models.Certificates;
+import com.azure.resourcemanager.iothub.models.IotHubResources;
+import com.azure.resourcemanager.iothub.models.IotHubs;
+import com.azure.resourcemanager.iothub.models.Operations;
+import com.azure.resourcemanager.iothub.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.iothub.models.PrivateLinkResourcesOperations;
+import com.azure.resourcemanager.iothub.models.ResourceProviderCommons;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to IotHubManager. Use this API to manage the IoT hubs in your Azure subscription. */
+public final class IotHubManager {
+ private Operations operations;
+
+ private IotHubResources iotHubResources;
+
+ private ResourceProviderCommons resourceProviderCommons;
+
+ private Certificates certificates;
+
+ private IotHubs iotHubs;
+
+ private PrivateLinkResourcesOperations privateLinkResourcesOperations;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private final IotHubClient clientObject;
+
+ private IotHubManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new IotHubClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of IotHub service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the IotHub service API instance.
+ */
+ public static IotHubManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create IotHubManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new IotHubManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of IotHub service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the IotHub service API instance.
+ */
+ public IotHubManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies
+ .add(
+ new UserAgentPolicy(
+ null,
+ "com.azure.resourcemanager.iothub",
+ "1.0.0-beta.1",
+ Configuration.getGlobalConfiguration()));
+ policies.add(new RequestIdPolicy());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies
+ .add(
+ new BearerTokenAuthenticationPolicy(
+ credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new IotHubManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of IotHubResources. */
+ public IotHubResources iotHubResources() {
+ if (this.iotHubResources == null) {
+ this.iotHubResources = new IotHubResourcesImpl(clientObject.getIotHubResources(), this);
+ }
+ return iotHubResources;
+ }
+
+ /** @return Resource collection API of ResourceProviderCommons. */
+ public ResourceProviderCommons resourceProviderCommons() {
+ if (this.resourceProviderCommons == null) {
+ this.resourceProviderCommons =
+ new ResourceProviderCommonsImpl(clientObject.getResourceProviderCommons(), this);
+ }
+ return resourceProviderCommons;
+ }
+
+ /** @return Resource collection API of Certificates. */
+ public Certificates certificates() {
+ if (this.certificates == null) {
+ this.certificates = new CertificatesImpl(clientObject.getCertificates(), this);
+ }
+ return certificates;
+ }
+
+ /** @return Resource collection API of IotHubs. */
+ public IotHubs iotHubs() {
+ if (this.iotHubs == null) {
+ this.iotHubs = new IotHubsImpl(clientObject.getIotHubs(), this);
+ }
+ return iotHubs;
+ }
+
+ /** @return Resource collection API of PrivateLinkResourcesOperations. */
+ public PrivateLinkResourcesOperations privateLinkResourcesOperations() {
+ if (this.privateLinkResourcesOperations == null) {
+ this.privateLinkResourcesOperations =
+ new PrivateLinkResourcesOperationsImpl(clientObject.getPrivateLinkResourcesOperations(), this);
+ }
+ return privateLinkResourcesOperations;
+ }
+
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /**
+ * @return Wrapped service client IotHubClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ */
+ public IotHubClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java
new file mode 100644
index 0000000000000..bc2ca2a5e211d
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/CertificatesClient.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
+import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
+
+/** An instance of this class provides access to all the operations defined in CertificatesClient. */
+public interface CertificatesClient {
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateListDescriptionInner listByIotHub(String resourceGroupName, String resourceName);
+
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listByIotHubWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateDescriptionInner get(String resourceGroupName, String resourceName, String certificateName);
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, Context context);
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateDescriptionInner createOrUpdate(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription);
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update
+ * an existing certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription,
+ String ifMatch,
+ Context context);
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceName, String certificateName, String ifMatch);
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context);
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateWithNonceDescriptionInner generateVerificationCode(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch);
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response generateVerificationCodeWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context);
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateDescriptionInner verify(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody);
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response verifyWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody,
+ Context context);
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubClient.java
new file mode 100644
index 0000000000000..1b9e4e0df543c
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubClient.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for IotHubClient class. */
+public interface IotHubClient {
+ /**
+ * Gets The subscription identifier.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the IotHubResourcesClient object to access its operations.
+ *
+ * @return the IotHubResourcesClient object.
+ */
+ IotHubResourcesClient getIotHubResources();
+
+ /**
+ * Gets the ResourceProviderCommonsClient object to access its operations.
+ *
+ * @return the ResourceProviderCommonsClient object.
+ */
+ ResourceProviderCommonsClient getResourceProviderCommons();
+
+ /**
+ * Gets the CertificatesClient object to access its operations.
+ *
+ * @return the CertificatesClient object.
+ */
+ CertificatesClient getCertificates();
+
+ /**
+ * Gets the IotHubsClient object to access its operations.
+ *
+ * @return the IotHubsClient object.
+ */
+ IotHubsClient getIotHubs();
+
+ /**
+ * Gets the PrivateLinkResourcesOperationsClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesOperationsClient object.
+ */
+ PrivateLinkResourcesOperationsClient getPrivateLinkResourcesOperations();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+}
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
new file mode 100644
index 0000000000000..5213c706fc68d
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java
@@ -0,0 +1,912 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+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.fluent.models.EndpointHealthDataInner;
+import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner;
+import com.azure.resourcemanager.iothub.fluent.models.IotHubDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.IotHubNameAvailabilityInfoInner;
+import com.azure.resourcemanager.iothub.fluent.models.IotHubQuotaMetricInfoInner;
+import com.azure.resourcemanager.iothub.fluent.models.IotHubSkuDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.JobResponseInner;
+import com.azure.resourcemanager.iothub.fluent.models.RegistryStatisticsInner;
+import com.azure.resourcemanager.iothub.fluent.models.SharedAccessSignatureAuthorizationRuleInner;
+import com.azure.resourcemanager.iothub.fluent.models.TestAllRoutesResultInner;
+import com.azure.resourcemanager.iothub.fluent.models.TestRouteResultInner;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
+import com.azure.resourcemanager.iothub.models.ExportDevicesRequest;
+import com.azure.resourcemanager.iothub.models.ImportDevicesRequest;
+import com.azure.resourcemanager.iothub.models.OperationInputs;
+import com.azure.resourcemanager.iothub.models.TagsResource;
+import com.azure.resourcemanager.iothub.models.TestAllRoutesInput;
+import com.azure.resourcemanager.iothub.models.TestRouteInput;
+
+/** An instance of this class provides access to all the operations defined in IotHubResourcesClient. */
+public interface IotHubResourcesClient {
+ /**
+ * Get the non-security related metadata of an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 non-security related metadata of an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner getByResourceGroup(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the non-security related metadata of an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 non-security related metadata of an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
+ * metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
+ * hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param iotHubDescription The IoT hub metadata and security metadata.
+ * @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an
+ * existing IoT Hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate(
+ String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch);
+
+ /**
+ * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
+ * metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
+ * hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param iotHubDescription The IoT hub metadata and security metadata.
+ * @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an
+ * existing IoT Hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IotHubDescriptionInner> beginCreateOrUpdate(
+ String resourceGroupName,
+ String resourceName,
+ IotHubDescriptionInner iotHubDescription,
+ String ifMatch,
+ Context context);
+
+ /**
+ * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
+ * metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
+ * hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param iotHubDescription The IoT hub metadata and security metadata.
+ * @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an
+ * existing IoT Hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner createOrUpdate(
+ String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription, String ifMatch);
+
+ /**
+ * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
+ * metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
+ * hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param iotHubDescription The IoT hub metadata and security metadata.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner createOrUpdate(
+ String resourceGroupName, String resourceName, IotHubDescriptionInner iotHubDescription);
+
+ /**
+ * Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub
+ * metadata and security metadata, and then combine them with the modified values in a new body to update the IoT
+ * hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param iotHubDescription The IoT hub metadata and security metadata.
+ * @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an
+ * existing IoT Hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner createOrUpdate(
+ String resourceGroupName,
+ String resourceName,
+ IotHubDescriptionInner iotHubDescription,
+ String ifMatch,
+ Context context);
+
+ /**
+ * Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName Resource group identifier.
+ * @param resourceName Name of iot hub to update.
+ * @param iotHubTags Updated tag information to set into the iot hub instance.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IotHubDescriptionInner> beginUpdate(
+ String resourceGroupName, String resourceName, TagsResource iotHubTags);
+
+ /**
+ * Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName Resource group identifier.
+ * @param resourceName Name of iot hub to update.
+ * @param iotHubTags Updated tag information to set into the iot hub instance.
+ * @param context The context to associate with this operation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IotHubDescriptionInner> beginUpdate(
+ String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context);
+
+ /**
+ * Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName Resource group identifier.
+ * @param resourceName Name of iot hub to update.
+ * @param iotHubTags Updated tag information to set into the iot hub instance.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner update(String resourceGroupName, String resourceName, TagsResource iotHubTags);
+
+ /**
+ * Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method.
+ *
+ * @param resourceGroupName Resource group identifier.
+ * @param resourceName Name of iot hub to update.
+ * @param iotHubTags Updated tag information to set into the iot hub instance.
+ * @param context The context to associate with this operation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner update(
+ String resourceGroupName, String resourceName, TagsResource iotHubTags, Context context);
+
+ /**
+ * Delete an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IotHubDescriptionInner> beginDelete(
+ String resourceGroupName, String resourceName);
+
+ /**
+ * Delete an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, IotHubDescriptionInner> beginDelete(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Delete an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner delete(String resourceGroupName, String resourceName);
+
+ /**
+ * Delete an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubDescriptionInner delete(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get all the IoT hubs in a subscription.
+ *
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Get all the IoT hubs in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Get all the IoT hubs in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Get all the IoT hubs in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Get the statistics from an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 statistics from an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RegistryStatisticsInner getStats(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the statistics from an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 statistics from an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getStatsWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get the list of valid SKUs for an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getValidSkus(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the list of valid SKUs for an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getValidSkus(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listEventHubConsumerGroups(
+ String resourceGroupName, String resourceName, String eventHubEndpointName);
+
+ /**
+ * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listEventHubConsumerGroups(
+ String resourceGroupName, String resourceName, String eventHubEndpointName, Context context);
+
+ /**
+ * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @param name The name of the consumer group to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventHubConsumerGroupInfoInner getEventHubConsumerGroup(
+ String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
+
+ /**
+ * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @param name The name of the consumer group to retrieve.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getEventHubConsumerGroupWithResponse(
+ String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context);
+
+ /**
+ * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties of the EventHubConsumerGroupInfo object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventHubConsumerGroupInfoInner createEventHubConsumerGroup(
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody);
+
+ /**
+ * Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @param name The name of the consumer group to add.
+ * @param consumerGroupBody The consumer group to add.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties of the EventHubConsumerGroupInfo object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createEventHubConsumerGroupWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String eventHubEndpointName,
+ String name,
+ EventHubConsumerGroupBodyDescription consumerGroupBody,
+ Context context);
+
+ /**
+ * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @param name The name of the consumer group to delete.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void deleteEventHubConsumerGroup(
+ String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
+
+ /**
+ * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param eventHubEndpointName The name of the Event Hub-compatible endpoint in the IoT hub.
+ * @param name The name of the consumer group to delete.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteEventHubConsumerGroupWithResponse(
+ String resourceGroupName, String resourceName, String eventHubEndpointName, String name, Context context);
+
+ /**
+ * Get a list of all the jobs in an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listJobs(String resourceGroupName, String resourceName);
+
+ /**
+ * Get a list of all the jobs in an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listJobs(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get the details of a job from an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param jobId The job identifier.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a job from an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobResponseInner getJob(String resourceGroupName, String resourceName, String jobId);
+
+ /**
+ * Get the details of a job from an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param jobId The job identifier.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 details of a job from an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getJobWithResponse(
+ String resourceGroupName, String resourceName, String jobId, Context context);
+
+ /**
+ * Get the quota metrics for an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getQuotaMetrics(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the quota metrics for an IoT hub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getQuotaMetrics(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get the health for routing endpoints.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param iotHubName The iotHubName parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getEndpointHealth(String resourceGroupName, String iotHubName);
+
+ /**
+ * Get the health for routing endpoints.
+ *
+ * @param resourceGroupName The resourceGroupName parameter.
+ * @param iotHubName The iotHubName parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable getEndpointHealth(
+ String resourceGroupName, String iotHubName, Context context);
+
+ /**
+ * Check if an IoT hub name is available.
+ *
+ * @param operationInputs Set the name parameter in the OperationInputs structure to the name of the IoT hub to
+ * check.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties indicating whether a given IoT hub name is available.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ IotHubNameAvailabilityInfoInner checkNameAvailability(OperationInputs operationInputs);
+
+ /**
+ * Check if an IoT hub name is available.
+ *
+ * @param operationInputs Set the name parameter in the OperationInputs structure to the name of the IoT hub to
+ * check.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties indicating whether a given IoT hub name is available.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ OperationInputs operationInputs, Context context);
+
+ /**
+ * Test all routes configured in this Iot Hub.
+ *
+ * @param iotHubName IotHub to be tested.
+ * @param resourceGroupName resource group which Iot Hub belongs to.
+ * @param input Input for testing all routes.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 testing all routes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TestAllRoutesResultInner testAllRoutes(String iotHubName, String resourceGroupName, TestAllRoutesInput input);
+
+ /**
+ * Test all routes configured in this Iot Hub.
+ *
+ * @param iotHubName IotHub to be tested.
+ * @param resourceGroupName resource group which Iot Hub belongs to.
+ * @param input Input for testing all routes.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 testing all routes.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response testAllRoutesWithResponse(
+ String iotHubName, String resourceGroupName, TestAllRoutesInput input, Context context);
+
+ /**
+ * Test the new route for this Iot Hub.
+ *
+ * @param iotHubName IotHub to be tested.
+ * @param resourceGroupName resource group which Iot Hub belongs to.
+ * @param input Route that needs to be tested.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 testing one route.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TestRouteResultInner testRoute(String iotHubName, String resourceGroupName, TestRouteInput input);
+
+ /**
+ * Test the new route for this Iot Hub.
+ *
+ * @param iotHubName IotHub to be tested.
+ * @param resourceGroupName resource group which Iot Hub belongs to.
+ * @param input Route that needs to be tested.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 testing one route.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response testRouteWithResponse(
+ String iotHubName, String resourceGroupName, TestRouteInput input, Context context);
+
+ /**
+ * Get the security metadata for an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listKeys(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the security metadata for an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listKeys(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get a shared access policy by name from an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param keyName The name of the shared access policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 shared access policy by name from an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SharedAccessSignatureAuthorizationRuleInner getKeysForKeyName(
+ String resourceGroupName, String resourceName, String keyName);
+
+ /**
+ * Get a shared access policy by name from an IoT hub. For more information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param keyName The name of the shared access policy.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 shared access policy by name from an IoT hub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getKeysForKeyNameWithResponse(
+ String resourceGroupName, String resourceName, String keyName, Context context);
+
+ /**
+ * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more
+ * information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param exportDevicesParameters The parameters that specify the export devices operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties of the Job Response object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobResponseInner exportDevices(
+ String resourceGroupName, String resourceName, ExportDevicesRequest exportDevicesParameters);
+
+ /**
+ * Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more
+ * information, see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param exportDevicesParameters The parameters that specify the export devices operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties of the Job Response object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response exportDevicesWithResponse(
+ String resourceGroupName, String resourceName, ExportDevicesRequest exportDevicesParameters, Context context);
+
+ /**
+ * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information,
+ * see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param importDevicesParameters The parameters that specify the import devices operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties of the Job Response object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ JobResponseInner importDevices(
+ String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters);
+
+ /**
+ * Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information,
+ * see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param importDevicesParameters The parameters that specify the import devices operation.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 properties of the Job Response object.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response importDevicesWithResponse(
+ String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters, Context context);
+}
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
new file mode 100644
index 0000000000000..70bc77d461df8
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubsClient.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+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;
+
+/** An instance of this class provides access to all the operations defined in IotHubsClient. */
+public interface IotHubsClient {
+ /**
+ * Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see
+ * https://aka.ms/manualfailover.
+ *
+ * @param iotHubName Name of the IoT hub to failover.
+ * @param resourceGroupName Name of the resource group containing the IoT hub resource.
+ * @param failoverInput Region to failover to. Must be the Azure paired region. Get the value from the secondary
+ * location in the locations property. To learn more, see https://aka.ms/manualfailover/region.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginManualFailover(
+ String iotHubName, String resourceGroupName, FailoverInput failoverInput);
+
+ /**
+ * Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see
+ * https://aka.ms/manualfailover.
+ *
+ * @param iotHubName Name of the IoT hub to failover.
+ * @param resourceGroupName Name of the resource group containing the IoT hub resource.
+ * @param failoverInput Region to failover to. Must be the Azure paired region. Get the value from the secondary
+ * location in the locations property. To learn more, see https://aka.ms/manualfailover/region.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginManualFailover(
+ String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context);
+
+ /**
+ * Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see
+ * https://aka.ms/manualfailover.
+ *
+ * @param iotHubName Name of the IoT hub to failover.
+ * @param resourceGroupName Name of the resource group containing the IoT hub resource.
+ * @param failoverInput Region to failover to. Must be the Azure paired region. Get the value from the secondary
+ * location in the locations property. To learn more, see https://aka.ms/manualfailover/region.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void manualFailover(String iotHubName, String resourceGroupName, FailoverInput failoverInput);
+
+ /**
+ * Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see
+ * https://aka.ms/manualfailover.
+ *
+ * @param iotHubName Name of the IoT hub to failover.
+ * @param resourceGroupName Name of the resource group containing the IoT hub resource.
+ * @param failoverInput Region to failover to. Must be the Azure paired region. Get the value from the secondary
+ * location in the locations property. To learn more, see https://aka.ms/manualfailover/region.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void manualFailover(String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context);
+}
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
new file mode 100644
index 0000000000000..c404a7b96c1b4
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/OperationsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.iothub.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists all of the available IoT Hub REST API 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.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists all of the available IoT Hub REST API operations.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @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
new file mode 100644
index 0000000000000..7563b1837ebf7
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,230 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+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.fluent.models.PrivateEndpointConnectionInner;
+import java.util.List;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * List private endpoint connection properties.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 private endpoint connections for an IotHub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ List list(String resourceGroupName, String resourceName);
+
+ /**
+ * List private endpoint connection properties.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 private endpoint connections for an IotHub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response> listWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get private endpoint connection properties.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 private endpoint connection properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Get private endpoint connection properties.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 private endpoint connection properties.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Update the status of a private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param privateEndpointConnection The private endpoint connection with updated properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdate(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection);
+
+ /**
+ * Update the status of a private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param privateEndpointConnection The private endpoint connection with updated properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginUpdate(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ Context context);
+
+ /**
+ * Update the status of a private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param privateEndpointConnection The private endpoint connection with updated properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner update(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection);
+
+ /**
+ * Update the status of a private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param privateEndpointConnection The private endpoint connection with updated properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner update(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner privateEndpointConnection,
+ Context context);
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginDelete(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, PrivateEndpointConnectionInner> beginDelete(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner delete(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Delete private endpoint connection with the specified name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner delete(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateLinkResourcesOperationsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateLinkResourcesOperationsClient.java
new file mode 100644
index 0000000000000..e9cdb4579ff57
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/PrivateLinkResourcesOperationsClient.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.iothub.fluent.models.GroupIdInformationInner;
+import com.azure.resourcemanager.iothub.fluent.models.PrivateLinkResourcesInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesOperationsClient. */
+public interface PrivateLinkResourcesOperationsClient {
+ /**
+ * List private link resources for the given IotHub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 available private link resources for an IotHub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourcesInner list(String resourceGroupName, String resourceName);
+
+ /**
+ * List private link resources for the given IotHub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 available private link resources for an IotHub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Get the specified private link resource for the given IotHub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param groupId The name of the private link resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 specified private link resource for the given IotHub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ GroupIdInformationInner get(String resourceGroupName, String resourceName, String groupId);
+
+ /**
+ * Get the specified private link resource for the given IotHub.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param groupId The name of the private link resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 specified private link resource for the given IotHub.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String resourceName, String groupId, Context context);
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/ResourceProviderCommonsClient.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/ResourceProviderCommonsClient.java
new file mode 100644
index 0000000000000..942cd190969bf
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/ResourceProviderCommonsClient.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.iothub.fluent.models.UserSubscriptionQuotaListResultInner;
+
+/** An instance of this class provides access to all the operations defined in ResourceProviderCommonsClient. */
+public interface ResourceProviderCommonsClient {
+ /**
+ * Get the number of free and paid iot hubs in the subscription.
+ *
+ * @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 number of free and paid iot hubs in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ UserSubscriptionQuotaListResultInner getSubscriptionQuota();
+
+ /**
+ * Get the number of free and paid iot hubs in the subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @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 number of free and paid iot hubs in the subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getSubscriptionQuotaWithResponse(Context context);
+}
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
new file mode 100644
index 0000000000000..4e3667bc34952
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateDescriptionInner.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+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.
+ */
+ @JsonProperty(value = "properties")
+ private CertificateProperties properties;
+
+ /*
+ * The entity tag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get the properties property: The description of an X509 CA Certificate.
+ *
+ * @return the properties value.
+ */
+ public CertificateProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The description of an X509 CA Certificate.
+ *
+ * @param properties the properties value to set.
+ * @return the CertificateDescriptionInner object itself.
+ */
+ public CertificateDescriptionInner withProperties(CertificateProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: The entity tag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..6ec54577bdd99
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateListDescriptionInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: The array of Certificate objects.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The array of Certificate objects.
+ *
+ * @param value the value value to set.
+ * @return the CertificateListDescriptionInner object itself.
+ */
+ public CertificateListDescriptionInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..872bcaa040a4f
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/CertificateWithNonceDescriptionInner.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+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.
+ */
+ @JsonProperty(value = "properties")
+ private CertificatePropertiesWithNonce properties;
+
+ /*
+ * The entity tag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get the properties property: The description of an X509 CA Certificate including the challenge nonce issued for
+ * the Proof-Of-Possession flow.
+ *
+ * @return the properties value.
+ */
+ public CertificatePropertiesWithNonce properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The description of an X509 CA Certificate including the challenge nonce issued for
+ * the Proof-Of-Possession flow.
+ *
+ * @param properties the properties value to set.
+ * @return the CertificateWithNonceDescriptionInner object itself.
+ */
+ public CertificateWithNonceDescriptionInner withProperties(CertificatePropertiesWithNonce properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: The entity tag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..2091a2c740a4f
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EndpointHealthDataInner.java
@@ -0,0 +1,228 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+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
+ */
+ @JsonProperty(value = "endpointId")
+ private String endpointId;
+
+ /*
+ * Health statuses have following meanings. The 'healthy' status shows that
+ * the endpoint is accepting messages as expected. The 'unhealthy' status
+ * shows that the endpoint is not accepting messages as expected and IoT
+ * Hub is retrying to send data to this endpoint. The status of an
+ * unhealthy endpoint will be updated to healthy when IoT Hub has
+ * established an eventually consistent state of health. The 'dead' status
+ * shows that the endpoint is not accepting messages, after IoT Hub retried
+ * sending messages for the retrial period. See IoT Hub metrics to identify
+ * errors and monitor issues with endpoints. The 'unknown' status shows
+ * that the IoT Hub has not established a connection with the endpoint. No
+ * messages have been delivered to or rejected from this endpoint
+ */
+ @JsonProperty(value = "healthStatus")
+ private EndpointHealthStatus healthStatus;
+
+ /*
+ * Last error obtained when a message failed to be delivered to iot hub
+ */
+ @JsonProperty(value = "lastKnownError")
+ private String lastKnownError;
+
+ /*
+ * Time at which the last known error occurred
+ */
+ @JsonProperty(value = "lastKnownErrorTime")
+ private DateTimeRfc1123 lastKnownErrorTime;
+
+ /*
+ * Last time iot hub successfully sent a message to the endpoint
+ */
+ @JsonProperty(value = "lastSuccessfulSendAttemptTime")
+ private DateTimeRfc1123 lastSuccessfulSendAttemptTime;
+
+ /*
+ * Last time iot hub tried to send a message to the endpoint
+ */
+ @JsonProperty(value = "lastSendAttemptTime")
+ private DateTimeRfc1123 lastSendAttemptTime;
+
+ /**
+ * Get the endpointId property: Id of the endpoint.
+ *
+ * @return the endpointId value.
+ */
+ public String endpointId() {
+ return this.endpointId;
+ }
+
+ /**
+ * Set the endpointId property: Id of the endpoint.
+ *
+ * @param endpointId the endpointId value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withEndpointId(String endpointId) {
+ this.endpointId = endpointId;
+ return this;
+ }
+
+ /**
+ * Get the healthStatus property: Health statuses have following meanings. The 'healthy' status shows that the
+ * endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting
+ * messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint
+ * will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead'
+ * status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial
+ * period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that
+ * the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected
+ * from this endpoint.
+ *
+ * @return the healthStatus value.
+ */
+ public EndpointHealthStatus healthStatus() {
+ return this.healthStatus;
+ }
+
+ /**
+ * Set the healthStatus property: Health statuses have following meanings. The 'healthy' status shows that the
+ * endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting
+ * messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint
+ * will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead'
+ * status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial
+ * period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that
+ * the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected
+ * from this endpoint.
+ *
+ * @param healthStatus the healthStatus value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withHealthStatus(EndpointHealthStatus healthStatus) {
+ this.healthStatus = healthStatus;
+ return this;
+ }
+
+ /**
+ * Get the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
+ *
+ * @return the lastKnownError value.
+ */
+ public String lastKnownError() {
+ return this.lastKnownError;
+ }
+
+ /**
+ * Set the lastKnownError property: Last error obtained when a message failed to be delivered to iot hub.
+ *
+ * @param lastKnownError the lastKnownError value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastKnownError(String lastKnownError) {
+ this.lastKnownError = lastKnownError;
+ return this;
+ }
+
+ /**
+ * Get the lastKnownErrorTime property: Time at which the last known error occurred.
+ *
+ * @return the lastKnownErrorTime value.
+ */
+ public OffsetDateTime lastKnownErrorTime() {
+ if (this.lastKnownErrorTime == null) {
+ return null;
+ }
+ return this.lastKnownErrorTime.getDateTime();
+ }
+
+ /**
+ * Set the lastKnownErrorTime property: Time at which the last known error occurred.
+ *
+ * @param lastKnownErrorTime the lastKnownErrorTime value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastKnownErrorTime(OffsetDateTime lastKnownErrorTime) {
+ if (lastKnownErrorTime == null) {
+ this.lastKnownErrorTime = null;
+ } else {
+ this.lastKnownErrorTime = new DateTimeRfc1123(lastKnownErrorTime);
+ }
+ return this;
+ }
+
+ /**
+ * Get the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
+ *
+ * @return the lastSuccessfulSendAttemptTime value.
+ */
+ public OffsetDateTime lastSuccessfulSendAttemptTime() {
+ if (this.lastSuccessfulSendAttemptTime == null) {
+ return null;
+ }
+ return this.lastSuccessfulSendAttemptTime.getDateTime();
+ }
+
+ /**
+ * Set the lastSuccessfulSendAttemptTime property: Last time iot hub successfully sent a message to the endpoint.
+ *
+ * @param lastSuccessfulSendAttemptTime the lastSuccessfulSendAttemptTime value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastSuccessfulSendAttemptTime(OffsetDateTime lastSuccessfulSendAttemptTime) {
+ if (lastSuccessfulSendAttemptTime == null) {
+ this.lastSuccessfulSendAttemptTime = null;
+ } else {
+ this.lastSuccessfulSendAttemptTime = new DateTimeRfc1123(lastSuccessfulSendAttemptTime);
+ }
+ return this;
+ }
+
+ /**
+ * Get the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
+ *
+ * @return the lastSendAttemptTime value.
+ */
+ public OffsetDateTime lastSendAttemptTime() {
+ if (this.lastSendAttemptTime == null) {
+ return null;
+ }
+ return this.lastSendAttemptTime.getDateTime();
+ }
+
+ /**
+ * Set the lastSendAttemptTime property: Last time iot hub tried to send a message to the endpoint.
+ *
+ * @param lastSendAttemptTime the lastSendAttemptTime value to set.
+ * @return the EndpointHealthDataInner object itself.
+ */
+ public EndpointHealthDataInner withLastSendAttemptTime(OffsetDateTime lastSendAttemptTime) {
+ if (lastSendAttemptTime == null) {
+ this.lastSendAttemptTime = null;
+ } else {
+ this.lastSendAttemptTime = new DateTimeRfc1123(lastSendAttemptTime);
+ }
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 0000000000000..95e4261c931e3
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/EventHubConsumerGroupInfoInner.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+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.JsonProperty;
+import java.util.Map;
+
+/** The properties of the EventHubConsumerGroupInfo object. */
+@Fluent
+public final class EventHubConsumerGroupInfoInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConsumerGroupInfoInner.class);
+
+ /*
+ * The tags.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /*
+ * The etag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get the properties property: The tags.
+ *
+ * @return the properties value.
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The tags.
+ *
+ * @param properties the properties value to set.
+ * @return the EventHubConsumerGroupInfoInner object itself.
+ */
+ public EventHubConsumerGroupInfoInner withProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: The etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 0000000000000..69ec9283f78c8
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/GroupIdInformationInner.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.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.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The resource name.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The resource type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /*
+ * The properties for a group information object
+ */
+ @JsonProperty(value = "properties", required = true)
+ private GroupIdInformationProperties properties;
+
+ /**
+ * Get the id property: The resource identifier.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The resource name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The resource type.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the properties property: The properties for a group information object.
+ *
+ * @return the properties value.
+ */
+ public GroupIdInformationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties for a group information object.
+ *
+ * @param properties the properties value to set.
+ * @return the GroupIdInformationInner object itself.
+ */
+ public GroupIdInformationInner withProperties(GroupIdInformationProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model GroupIdInformationInner"));
+ } else {
+ properties().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..4eebe4e0ddf75
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubDescriptionInner.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+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
+ * convention.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /*
+ * IotHub properties
+ */
+ @JsonProperty(value = "properties")
+ private IotHubProperties properties;
+
+ /*
+ * IotHub SKU info
+ */
+ @JsonProperty(value = "sku", required = true)
+ private IotHubSkuInfo sku;
+
+ /**
+ * Get the etag property: 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 convention.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: 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 convention.
+ *
+ * @param etag the etag value to set.
+ * @return the IotHubDescriptionInner object itself.
+ */
+ public IotHubDescriptionInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the properties property: IotHub properties.
+ *
+ * @return the properties value.
+ */
+ public IotHubProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: IotHub properties.
+ *
+ * @param properties the properties value to set.
+ * @return the IotHubDescriptionInner object itself.
+ */
+ public IotHubDescriptionInner withProperties(IotHubProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the sku property: IotHub SKU info.
+ *
+ * @return the sku value.
+ */
+ public IotHubSkuInfo sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: IotHub SKU info.
+ *
+ * @param sku the sku value to set.
+ * @return the IotHubDescriptionInner object itself.
+ */
+ public IotHubDescriptionInner withSku(IotHubSkuInfo sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public IotHubDescriptionInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public IotHubDescriptionInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (sku() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property sku in model IotHubDescriptionInner"));
+ } else {
+ sku().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..290637ad21501
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubNameAvailabilityInfoInner.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.
+ */
+ @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean nameAvailable;
+
+ /*
+ * The reason for unavailability.
+ */
+ @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
+ private IotHubNameUnavailabilityReason reason;
+
+ /*
+ * The detailed reason message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Get the nameAvailable property: The value which indicates whether the provided name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Get the reason property: The reason for unavailability.
+ *
+ * @return the reason value.
+ */
+ public IotHubNameUnavailabilityReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the message property: The detailed reason message.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: The detailed reason message.
+ *
+ * @param message the message value to set.
+ * @return the IotHubNameAvailabilityInfoInner object itself.
+ */
+ public IotHubNameAvailabilityInfoInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 0000000000000..e82c4fb87f8b5
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubQuotaMetricInfoInner.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The current value for the quota metric.
+ */
+ @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY)
+ private Long currentValue;
+
+ /*
+ * The maximum value of the quota metric.
+ */
+ @JsonProperty(value = "maxValue", access = JsonProperty.Access.WRITE_ONLY)
+ private Long maxValue;
+
+ /**
+ * Get the name property: The name of the quota metric.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the currentValue property: The current value for the quota metric.
+ *
+ * @return the currentValue value.
+ */
+ public Long currentValue() {
+ return this.currentValue;
+ }
+
+ /**
+ * Get the maxValue property: The maximum value of the quota metric.
+ *
+ * @return the maxValue value.
+ */
+ public Long maxValue() {
+ return this.maxValue;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 0000000000000..72e8ad5a00c6e
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/IotHubSkuDescriptionInner.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.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.
+ */
+ @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY)
+ private String resourceType;
+
+ /*
+ * The type of the resource.
+ */
+ @JsonProperty(value = "sku", required = true)
+ private IotHubSkuInfo sku;
+
+ /*
+ * IotHub capacity
+ */
+ @JsonProperty(value = "capacity", required = true)
+ private IotHubCapacity capacity;
+
+ /**
+ * Get the resourceType property: The type of the resource.
+ *
+ * @return the resourceType value.
+ */
+ public String resourceType() {
+ return this.resourceType;
+ }
+
+ /**
+ * Get the sku property: The type of the resource.
+ *
+ * @return the sku value.
+ */
+ public IotHubSkuInfo sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The type of the resource.
+ *
+ * @param sku the sku value to set.
+ * @return the IotHubSkuDescriptionInner object itself.
+ */
+ public IotHubSkuDescriptionInner withSku(IotHubSkuInfo sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the capacity property: IotHub capacity.
+ *
+ * @return the capacity value.
+ */
+ public IotHubCapacity capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Set the capacity property: IotHub capacity.
+ *
+ * @param capacity the capacity value to set.
+ * @return the IotHubSkuDescriptionInner object itself.
+ */
+ public IotHubSkuDescriptionInner withCapacity(IotHubCapacity capacity) {
+ this.capacity = capacity;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property sku in model IotHubSkuDescriptionInner"));
+ } else {
+ sku().validate();
+ }
+ if (capacity() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property capacity in model IotHubSkuDescriptionInner"));
+ } else {
+ capacity().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..14c7771996198
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/JobResponseInner.java
@@ -0,0 +1,154 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+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.
+ */
+ @JsonProperty(value = "jobId", access = JsonProperty.Access.WRITE_ONLY)
+ private String jobId;
+
+ /*
+ * The start time of the job.
+ */
+ @JsonProperty(value = "startTimeUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 startTimeUtc;
+
+ /*
+ * The time the job stopped processing.
+ */
+ @JsonProperty(value = "endTimeUtc", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 endTimeUtc;
+
+ /*
+ * The type of the job.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private JobType type;
+
+ /*
+ * The status of the job.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private JobStatus status;
+
+ /*
+ * If status == failed, this string containing the reason for the failure.
+ */
+ @JsonProperty(value = "failureReason", access = JsonProperty.Access.WRITE_ONLY)
+ private String failureReason;
+
+ /*
+ * The status message for the job.
+ */
+ @JsonProperty(value = "statusMessage", access = JsonProperty.Access.WRITE_ONLY)
+ private String statusMessage;
+
+ /*
+ * The job identifier of the parent job, if any.
+ */
+ @JsonProperty(value = "parentJobId", access = JsonProperty.Access.WRITE_ONLY)
+ private String parentJobId;
+
+ /**
+ * Get the jobId property: The job identifier.
+ *
+ * @return the jobId value.
+ */
+ public String jobId() {
+ return this.jobId;
+ }
+
+ /**
+ * Get the startTimeUtc property: The start time of the job.
+ *
+ * @return the startTimeUtc value.
+ */
+ public OffsetDateTime startTimeUtc() {
+ if (this.startTimeUtc == null) {
+ return null;
+ }
+ return this.startTimeUtc.getDateTime();
+ }
+
+ /**
+ * Get the endTimeUtc property: The time the job stopped processing.
+ *
+ * @return the endTimeUtc value.
+ */
+ public OffsetDateTime endTimeUtc() {
+ if (this.endTimeUtc == null) {
+ return null;
+ }
+ return this.endTimeUtc.getDateTime();
+ }
+
+ /**
+ * Get the type property: The type of the job.
+ *
+ * @return the type value.
+ */
+ public JobType type() {
+ return this.type;
+ }
+
+ /**
+ * Get the status property: The status of the job.
+ *
+ * @return the status value.
+ */
+ public JobStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the failureReason property: If status == failed, this string containing the reason for the failure.
+ *
+ * @return the failureReason value.
+ */
+ public String failureReason() {
+ return this.failureReason;
+ }
+
+ /**
+ * Get the statusMessage property: The status message for the job.
+ *
+ * @return the statusMessage value.
+ */
+ public String statusMessage() {
+ return this.statusMessage;
+ }
+
+ /**
+ * Get the parentJobId property: The job identifier of the parent job, if any.
+ *
+ * @return the parentJobId value.
+ */
+ public String parentJobId() {
+ return this.parentJobId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 0000000000000..81b5caab0d88a
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/OperationInner.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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}
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The object that represents the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get the name property: Operation name: {provider}/{resource}/{read | write | action | delete}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the display property: The object that represents the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: The object that represents the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..57368cce98007
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.fluent.models;
+
+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.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
+ */
+ @JsonProperty(value = "properties", required = true)
+ private PrivateEndpointConnectionProperties properties;
+
+ /**
+ * Get the properties property: The properties of a private endpoint connection.
+ *
+ * @return the properties value.
+ */
+ public PrivateEndpointConnectionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties of a private endpoint connection.
+ *
+ * @param properties the properties value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property properties in model PrivateEndpointConnectionInner"));
+ } else {
+ properties().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..5516fc45a2d5d
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/PrivateLinkResourcesInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: The list of available private link resources for an IotHub.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The list of available private link resources for an IotHub.
+ *
+ * @param value the value value to set.
+ * @return the PrivateLinkResourcesInner object itself.
+ */
+ public PrivateLinkResourcesInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..15d0c948a8f7b
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/RegistryStatisticsInner.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.
+ */
+ @JsonProperty(value = "totalDeviceCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long totalDeviceCount;
+
+ /*
+ * The count of enabled devices in the identity registry.
+ */
+ @JsonProperty(value = "enabledDeviceCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long enabledDeviceCount;
+
+ /*
+ * The count of disabled devices in the identity registry.
+ */
+ @JsonProperty(value = "disabledDeviceCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long disabledDeviceCount;
+
+ /**
+ * Get the totalDeviceCount property: The total count of devices in the identity registry.
+ *
+ * @return the totalDeviceCount value.
+ */
+ public Long totalDeviceCount() {
+ return this.totalDeviceCount;
+ }
+
+ /**
+ * Get the enabledDeviceCount property: The count of enabled devices in the identity registry.
+ *
+ * @return the enabledDeviceCount value.
+ */
+ public Long enabledDeviceCount() {
+ return this.enabledDeviceCount;
+ }
+
+ /**
+ * Get the disabledDeviceCount property: The count of disabled devices in the identity registry.
+ *
+ * @return the disabledDeviceCount value.
+ */
+ public Long disabledDeviceCount() {
+ return this.disabledDeviceCount;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
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
new file mode 100644
index 0000000000000..86a4837904c87
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/SharedAccessSignatureAuthorizationRuleInner.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.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.
+ */
+ @JsonProperty(value = "keyName", required = true)
+ private String keyName;
+
+ /*
+ * The primary key.
+ */
+ @JsonProperty(value = "primaryKey")
+ private String primaryKey;
+
+ /*
+ * The secondary key.
+ */
+ @JsonProperty(value = "secondaryKey")
+ private String secondaryKey;
+
+ /*
+ * The permissions assigned to the shared access policy.
+ */
+ @JsonProperty(value = "rights", required = true)
+ private AccessRights rights;
+
+ /**
+ * Get the keyName property: The name of the shared access policy.
+ *
+ * @return the keyName value.
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set the keyName property: The name of the shared access policy.
+ *
+ * @param keyName the keyName value to set.
+ * @return the SharedAccessSignatureAuthorizationRuleInner object itself.
+ */
+ public SharedAccessSignatureAuthorizationRuleInner withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+ /**
+ * Get the primaryKey property: The primary key.
+ *
+ * @return the primaryKey value.
+ */
+ public String primaryKey() {
+ return this.primaryKey;
+ }
+
+ /**
+ * Set the primaryKey property: The primary key.
+ *
+ * @param primaryKey the primaryKey value to set.
+ * @return the SharedAccessSignatureAuthorizationRuleInner object itself.
+ */
+ public SharedAccessSignatureAuthorizationRuleInner withPrimaryKey(String primaryKey) {
+ this.primaryKey = primaryKey;
+ return this;
+ }
+
+ /**
+ * Get the secondaryKey property: The secondary key.
+ *
+ * @return the secondaryKey value.
+ */
+ public String secondaryKey() {
+ return this.secondaryKey;
+ }
+
+ /**
+ * Set the secondaryKey property: The secondary key.
+ *
+ * @param secondaryKey the secondaryKey value to set.
+ * @return the SharedAccessSignatureAuthorizationRuleInner object itself.
+ */
+ public SharedAccessSignatureAuthorizationRuleInner withSecondaryKey(String secondaryKey) {
+ this.secondaryKey = secondaryKey;
+ return this;
+ }
+
+ /**
+ * Get the rights property: The permissions assigned to the shared access policy.
+ *
+ * @return the rights value.
+ */
+ public AccessRights rights() {
+ return this.rights;
+ }
+
+ /**
+ * Set the rights property: The permissions assigned to the shared access policy.
+ *
+ * @param rights the rights value to set.
+ * @return the SharedAccessSignatureAuthorizationRuleInner object itself.
+ */
+ public SharedAccessSignatureAuthorizationRuleInner withRights(AccessRights rights) {
+ this.rights = rights;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (keyName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property keyName in model SharedAccessSignatureAuthorizationRuleInner"));
+ }
+ if (rights() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property rights in model SharedAccessSignatureAuthorizationRuleInner"));
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..1c15d09d95c13
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestAllRoutesResultInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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
+ */
+ @JsonProperty(value = "routes")
+ private List routes;
+
+ /**
+ * Get the routes property: JSON-serialized array of matched routes.
+ *
+ * @return the routes value.
+ */
+ public List routes() {
+ return this.routes;
+ }
+
+ /**
+ * Set the routes property: JSON-serialized array of matched routes.
+ *
+ * @param routes the routes value to set.
+ * @return the TestAllRoutesResultInner object itself.
+ */
+ public TestAllRoutesResultInner withRoutes(List routes) {
+ this.routes = routes;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (routes() != null) {
+ routes().forEach(e -> e.validate());
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..2feeec924d303
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/TestRouteResultInner.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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
+ */
+ @JsonProperty(value = "result")
+ private TestResultStatus result;
+
+ /*
+ * Detailed result of testing route
+ */
+ @JsonProperty(value = "details")
+ private TestRouteResultDetails details;
+
+ /**
+ * Get the result property: Result of testing route.
+ *
+ * @return the result value.
+ */
+ public TestResultStatus result() {
+ return this.result;
+ }
+
+ /**
+ * Set the result property: Result of testing route.
+ *
+ * @param result the result value to set.
+ * @return the TestRouteResultInner object itself.
+ */
+ public TestRouteResultInner withResult(TestResultStatus result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get the details property: Detailed result of testing route.
+ *
+ * @return the details value.
+ */
+ public TestRouteResultDetails details() {
+ return this.details;
+ }
+
+ /**
+ * Set the details property: Detailed result of testing route.
+ *
+ * @param details the details value to set.
+ * @return the TestRouteResultInner object itself.
+ */
+ public TestRouteResultInner withDetails(TestRouteResultDetails details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (details() != null) {
+ details().validate();
+ }
+ }
+}
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
new file mode 100644
index 0000000000000..eae7058bb036d
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/UserSubscriptionQuotaListResultInner.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+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.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /*
+ * The nextLink property.
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * Get the value property: The value property.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The value property.
+ *
+ * @param value the value value to set.
+ * @return the UserSubscriptionQuotaListResultInner object itself.
+ */
+ public UserSubscriptionQuotaListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The nextLink property.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/package-info.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/package-info.java
new file mode 100644
index 0000000000000..4fc871e485eb1
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for IotHubClient. Use this API to manage the IoT hubs in your Azure
+ * subscription.
+ */
+package com.azure.resourcemanager.iothub.fluent.models;
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/package-info.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/package-info.java
new file mode 100644
index 0000000000000..b0f3951832362
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for IotHubClient. Use this API to manage the IoT hubs in your Azure
+ * subscription.
+ */
+package com.azure.resourcemanager.iothub.fluent;
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
new file mode 100644
index 0000000000000..3fffff912317f
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateDescriptionImpl.java
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
+import com.azure.resourcemanager.iothub.models.CertificateDescription;
+import com.azure.resourcemanager.iothub.models.CertificateProperties;
+
+public final class CertificateDescriptionImpl
+ implements CertificateDescription, CertificateDescription.Definition, CertificateDescription.Update {
+ private CertificateDescriptionInner innerObject;
+
+ private final IotHubManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public CertificateProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public CertificateDescriptionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private String certificateName;
+
+ private String createIfMatch;
+
+ private String updateIfMatch;
+
+ public CertificateDescriptionImpl withExistingIotHub(String resourceGroupName, String resourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ public CertificateDescription create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .createOrUpdateWithResponse(
+ resourceGroupName, resourceName, certificateName, this.innerModel(), createIfMatch, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CertificateDescription create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .createOrUpdateWithResponse(
+ resourceGroupName, resourceName, certificateName, this.innerModel(), createIfMatch, context)
+ .getValue();
+ return this;
+ }
+
+ CertificateDescriptionImpl(String name, IotHubManager serviceManager) {
+ this.innerObject = new CertificateDescriptionInner();
+ this.serviceManager = serviceManager;
+ this.certificateName = name;
+ this.createIfMatch = null;
+ }
+
+ public CertificateDescriptionImpl update() {
+ this.updateIfMatch = null;
+ return this;
+ }
+
+ public CertificateDescription apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .createOrUpdateWithResponse(
+ resourceGroupName, resourceName, certificateName, this.innerModel(), updateIfMatch, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CertificateDescription apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .createOrUpdateWithResponse(
+ resourceGroupName, resourceName, certificateName, this.innerModel(), updateIfMatch, context)
+ .getValue();
+ return this;
+ }
+
+ CertificateDescriptionImpl(CertificateDescriptionInner innerObject, IotHubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "IotHubs");
+ this.certificateName = Utils.getValueFromIdByName(innerObject.id(), "certificates");
+ }
+
+ public CertificateDescription refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CertificateDescription refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getCertificates()
+ .getWithResponse(resourceGroupName, resourceName, certificateName, context)
+ .getValue();
+ return this;
+ }
+
+ public CertificateDescriptionImpl withProperties(CertificateProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public CertificateDescriptionImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.createIfMatch = ifMatch;
+ return this;
+ } else {
+ this.updateIfMatch = ifMatch;
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateListDescriptionImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateListDescriptionImpl.java
new file mode 100644
index 0000000000000..fb088b0a32e46
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateListDescriptionImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
+import com.azure.resourcemanager.iothub.models.CertificateDescription;
+import com.azure.resourcemanager.iothub.models.CertificateListDescription;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class CertificateListDescriptionImpl implements CertificateListDescription {
+ private CertificateListDescriptionInner innerObject;
+
+ private final IotHubManager serviceManager;
+
+ CertificateListDescriptionImpl(CertificateListDescriptionInner innerObject, IotHubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new CertificateDescriptionImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public CertificateListDescriptionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateWithNonceDescriptionImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateWithNonceDescriptionImpl.java
new file mode 100644
index 0000000000000..0376d3e2e301d
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificateWithNonceDescriptionImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
+import com.azure.resourcemanager.iothub.models.CertificatePropertiesWithNonce;
+import com.azure.resourcemanager.iothub.models.CertificateWithNonceDescription;
+
+public final class CertificateWithNonceDescriptionImpl implements CertificateWithNonceDescription {
+ private CertificateWithNonceDescriptionInner innerObject;
+
+ private final IotHubManager serviceManager;
+
+ CertificateWithNonceDescriptionImpl(
+ CertificateWithNonceDescriptionInner innerObject, IotHubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public CertificatePropertiesWithNonce properties() {
+ return this.innerModel().properties();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public CertificateWithNonceDescriptionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 0000000000000..f36c6273e6bc5
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesClientImpl.java
@@ -0,0 +1,1322 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+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;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
+import com.azure.resourcemanager.iothub.models.CertificateVerificationDescription;
+import com.azure.resourcemanager.iothub.models.ErrorDetailsException;
+import reactor.core.publisher.Mono;
+
+/** 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;
+
+ /** The service client containing this operation class. */
+ private final IotHubClientImpl client;
+
+ /**
+ * Initializes an instance of CertificatesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CertificatesClientImpl(IotHubClientImpl client) {
+ this.service =
+ RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for IotHubClientCertificates to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "IotHubClientCertific")
+ private interface CertificatesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs"
+ + "/{resourceName}/certificates")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorDetailsException.class)
+ Mono> listByIotHub(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs"
+ + "/{resourceName}/certificates/{certificateName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorDetailsException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs"
+ + "/{resourceName}/certificates/{certificateName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ErrorDetailsException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("If-Match") String ifMatch,
+ @BodyParam("application/json") CertificateDescriptionInner certificateDescription,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs"
+ + "/{resourceName}/certificates/{certificateName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ErrorDetailsException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs"
+ + "/{resourceName}/certificates/{certificateName}/generateVerificationCode")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorDetailsException.class)
+ Mono> generateVerificationCode(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs"
+ + "/{resourceName}/certificates/{certificateName}/verify")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ErrorDetailsException.class)
+ Mono> verify(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @PathParam("certificateName") String certificateName,
+ @HeaderParam("If-Match") String ifMatch,
+ @BodyParam("application/json") CertificateVerificationDescription certificateVerificationBody,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByIotHubWithResponseAsync(
+ String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByIotHub(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByIotHubWithResponseAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByIotHub(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @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();
+ }
+ });
+ }
+
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateListDescriptionInner listByIotHub(String resourceGroupName, String resourceName) {
+ return listByIotHubAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Returns the list of certificates.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param context The context to associate with this operation.
+ * @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 JSON-serialized array of Certificate objects.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listByIotHubWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ return listByIotHubWithResponseAsync(resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String resourceName, String certificateName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String resourceName, String certificateName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ accept,
+ context);
+ }
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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();
+ }
+ });
+ }
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateDescriptionInner get(String resourceGroupName, String resourceName, String certificateName) {
+ return getAsync(resourceGroupName, resourceName, certificateName).block();
+ }
+
+ /**
+ * Returns the certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, Context context) {
+ return getWithResponseAsync(resourceGroupName, resourceName, certificateName, context).block();
+ }
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update
+ * an existing certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription,
+ String ifMatch) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (certificateDescription == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter certificateDescription is required and cannot be null."));
+ } else {
+ certificateDescription.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ certificateDescription,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update
+ * an existing certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription,
+ String ifMatch,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (certificateDescription == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException("Parameter certificateDescription is required and cannot be null."));
+ } else {
+ certificateDescription.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ certificateDescription,
+ accept,
+ context);
+ }
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update
+ * an existing certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription,
+ 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();
+ }
+ });
+ }
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription) {
+ 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();
+ }
+ });
+ }
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateDescriptionInner createOrUpdate(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription) {
+ final String ifMatch = null;
+ return createOrUpdateAsync(resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch)
+ .block();
+ }
+
+ /**
+ * Adds new or replaces existing certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param certificateDescription The certificate body.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update
+ * an existing certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ CertificateDescriptionInner certificateDescription,
+ String ifMatch,
+ Context context) {
+ return createOrUpdateWithResponseAsync(
+ resourceGroupName, resourceName, certificateName, certificateDescription, ifMatch, context)
+ .block();
+ }
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (ifMatch == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ifMatch is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param context The context to associate with this operation.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (ifMatch == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ifMatch is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, certificateName, ifMatch)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ deleteAsync(resourceGroupName, resourceName, certificateName, ifMatch).block();
+ }
+
+ /**
+ * Deletes an existing X509 certificate or does nothing if it does not exist.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param context The context to associate with this operation.
+ * @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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, certificateName, ifMatch, context).block();
+ }
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> generateVerificationCodeWithResponseAsync(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (ifMatch == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ifMatch is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .generateVerificationCode(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> generateVerificationCodeWithResponseAsync(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (ifMatch == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ifMatch is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .generateVerificationCode(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ accept,
+ context);
+ }
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ 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();
+ }
+ });
+ }
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateWithNonceDescriptionInner generateVerificationCode(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ return generateVerificationCodeAsync(resourceGroupName, resourceName, certificateName, ifMatch).block();
+ }
+
+ /**
+ * Generates verification code for proof of possession flow. The verification code will be used to generate a leaf
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response generateVerificationCodeWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context) {
+ return generateVerificationCodeWithResponseAsync(
+ resourceGroupName, resourceName, certificateName, ifMatch, context)
+ .block();
+ }
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> verifyWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (ifMatch == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ifMatch is required and cannot be null."));
+ }
+ if (certificateVerificationBody == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter certificateVerificationBody is required and cannot be null."));
+ } else {
+ certificateVerificationBody.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .verify(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ certificateVerificationBody,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> verifyWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (certificateName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null."));
+ }
+ if (ifMatch == null) {
+ return Mono.error(new IllegalArgumentException("Parameter ifMatch is required and cannot be null."));
+ }
+ if (certificateVerificationBody == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter certificateVerificationBody is required and cannot be null."));
+ } else {
+ certificateVerificationBody.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .verify(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ certificateName,
+ ifMatch,
+ certificateVerificationBody,
+ accept,
+ context);
+ }
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono verifyAsync(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ 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();
+ }
+ });
+ }
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateDescriptionInner verify(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody) {
+ return verifyAsync(resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody)
+ .block();
+ }
+
+ /**
+ * Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded
+ * certificate.
+ *
+ * @param resourceGroupName The name of the resource group that contains the IoT hub.
+ * @param resourceName The name of the IoT hub.
+ * @param certificateName The name of the certificate.
+ * @param ifMatch ETag of the Certificate.
+ * @param certificateVerificationBody The name of the certificate.
+ * @param context The context to associate with this operation.
+ * @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 X509 Certificate.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response verifyWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody,
+ Context context) {
+ return verifyWithResponseAsync(
+ resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody, context)
+ .block();
+ }
+}
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
new file mode 100644
index 0000000000000..a77db696aabd6
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/CertificatesImpl.java
@@ -0,0 +1,281 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.CertificatesClient;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateListDescriptionInner;
+import com.azure.resourcemanager.iothub.fluent.models.CertificateWithNonceDescriptionInner;
+import com.azure.resourcemanager.iothub.models.CertificateDescription;
+import com.azure.resourcemanager.iothub.models.CertificateListDescription;
+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 final CertificatesClient innerClient;
+
+ private final IotHubManager serviceManager;
+
+ public CertificatesImpl(CertificatesClient innerClient, IotHubManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public CertificateListDescription listByIotHub(String resourceGroupName, String resourceName) {
+ CertificateListDescriptionInner inner = this.serviceClient().listByIotHub(resourceGroupName, resourceName);
+ if (inner != null) {
+ return new CertificateListDescriptionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listByIotHubWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ Response inner =
+ this.serviceClient().listByIotHubWithResponse(resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CertificateListDescriptionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CertificateDescription get(String resourceGroupName, String resourceName, String certificateName) {
+ CertificateDescriptionInner inner = this.serviceClient().get(resourceGroupName, resourceName, certificateName);
+ if (inner != null) {
+ return new CertificateDescriptionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, resourceName, certificateName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CertificateDescriptionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ this.serviceClient().delete(resourceGroupName, resourceName, certificateName, ifMatch);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, resourceName, certificateName, ifMatch, context);
+ }
+
+ public CertificateWithNonceDescription generateVerificationCode(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ CertificateWithNonceDescriptionInner inner =
+ this.serviceClient().generateVerificationCode(resourceGroupName, resourceName, certificateName, ifMatch);
+ if (inner != null) {
+ return new CertificateWithNonceDescriptionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response generateVerificationCodeWithResponse(
+ String resourceGroupName, String resourceName, String certificateName, String ifMatch, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .generateVerificationCodeWithResponse(
+ resourceGroupName, resourceName, certificateName, ifMatch, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CertificateWithNonceDescriptionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CertificateDescription verify(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody) {
+ CertificateDescriptionInner inner =
+ this
+ .serviceClient()
+ .verify(resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody);
+ if (inner != null) {
+ return new CertificateDescriptionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response verifyWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String certificateName,
+ String ifMatch,
+ CertificateVerificationDescription certificateVerificationBody,
+ Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .verifyWithResponse(
+ resourceGroupName, resourceName, certificateName, ifMatch, certificateVerificationBody, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CertificateDescriptionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CertificateDescription getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ 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
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, resourceName, certificateName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ 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
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, resourceName, certificateName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ 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
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ String localIfMatch = null;
+ this
+ .deleteWithResponse(resourceGroupName, resourceName, certificateName, localIfMatch, Context.NONE)
+ .getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, String ifMatch, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "IotHubs");
+ if (resourceName == null) {
+ 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
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, resourceName, certificateName, ifMatch, context);
+ }
+
+ private CertificatesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+
+ public CertificateDescriptionImpl define(String name) {
+ return new CertificateDescriptionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java
new file mode 100644
index 0000000000000..c23ce60309115
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EndpointHealthDataImpl.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.models.EndpointHealthDataInner;
+import com.azure.resourcemanager.iothub.models.EndpointHealthData;
+import com.azure.resourcemanager.iothub.models.EndpointHealthStatus;
+import java.time.OffsetDateTime;
+
+public final class EndpointHealthDataImpl implements EndpointHealthData {
+ private EndpointHealthDataInner innerObject;
+
+ private final IotHubManager serviceManager;
+
+ EndpointHealthDataImpl(EndpointHealthDataInner innerObject, IotHubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String endpointId() {
+ return this.innerModel().endpointId();
+ }
+
+ public EndpointHealthStatus healthStatus() {
+ return this.innerModel().healthStatus();
+ }
+
+ public String lastKnownError() {
+ return this.innerModel().lastKnownError();
+ }
+
+ public OffsetDateTime lastKnownErrorTime() {
+ return this.innerModel().lastKnownErrorTime();
+ }
+
+ public OffsetDateTime lastSuccessfulSendAttemptTime() {
+ return this.innerModel().lastSuccessfulSendAttemptTime();
+ }
+
+ public OffsetDateTime lastSendAttemptTime() {
+ return this.innerModel().lastSendAttemptTime();
+ }
+
+ public EndpointHealthDataInner innerModel() {
+ return this.innerObject;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java
new file mode 100644
index 0000000000000..659397b9f4483
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/EventHubConsumerGroupInfoImpl.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.models.EventHubConsumerGroupInfoInner;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupBodyDescription;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupInfo;
+import com.azure.resourcemanager.iothub.models.EventHubConsumerGroupName;
+import java.util.Collections;
+import java.util.Map;
+
+public final class EventHubConsumerGroupInfoImpl
+ implements EventHubConsumerGroupInfo, EventHubConsumerGroupInfo.Definition {
+ private EventHubConsumerGroupInfoInner innerObject;
+
+ private final IotHubManager serviceManager;
+
+ EventHubConsumerGroupInfoImpl(EventHubConsumerGroupInfoInner innerObject, IotHubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Map properties() {
+ Map inner = this.innerModel().properties();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public EventHubConsumerGroupInfoInner innerModel() {
+ return this.innerObject;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private String eventHubEndpointName;
+
+ private String name;
+
+ private EventHubConsumerGroupBodyDescription createConsumerGroupBody;
+
+ public EventHubConsumerGroupInfoImpl withExistingEventHubEndpoint(
+ String resourceGroupName, String resourceName, String eventHubEndpointName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ this.eventHubEndpointName = eventHubEndpointName;
+ return this;
+ }
+
+ public EventHubConsumerGroupInfo create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .createEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, createConsumerGroupBody, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EventHubConsumerGroupInfo create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .createEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, createConsumerGroupBody, context)
+ .getValue();
+ return this;
+ }
+
+ EventHubConsumerGroupInfoImpl(String name, IotHubManager serviceManager) {
+ this.innerObject = new EventHubConsumerGroupInfoInner();
+ this.serviceManager = serviceManager;
+ this.name = name;
+ this.createConsumerGroupBody = new EventHubConsumerGroupBodyDescription();
+ }
+
+ public EventHubConsumerGroupInfo refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .getEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EventHubConsumerGroupInfo refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getIotHubResources()
+ .getEventHubConsumerGroupWithResponse(
+ resourceGroupName, resourceName, eventHubEndpointName, name, context)
+ .getValue();
+ return this;
+ }
+
+ public EventHubConsumerGroupInfoImpl withProperties(EventHubConsumerGroupName properties) {
+ this.createConsumerGroupBody.withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/GroupIdInformationImpl.java b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/GroupIdInformationImpl.java
new file mode 100644
index 0000000000000..2a4b7cc3d9db0
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/GroupIdInformationImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.resourcemanager.iothub.IotHubManager;
+import com.azure.resourcemanager.iothub.fluent.models.GroupIdInformationInner;
+import com.azure.resourcemanager.iothub.models.GroupIdInformation;
+import com.azure.resourcemanager.iothub.models.GroupIdInformationProperties;
+
+public final class GroupIdInformationImpl implements GroupIdInformation {
+ private GroupIdInformationInner innerObject;
+
+ private final IotHubManager serviceManager;
+
+ GroupIdInformationImpl(GroupIdInformationInner innerObject, IotHubManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public GroupIdInformationProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public GroupIdInformationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private IotHubManager manager() {
+ return this.serviceManager;
+ }
+}
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
new file mode 100644
index 0000000000000..2078371547333
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+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;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/** A builder for creating a new instance of the IotHubClientImpl type. */
+@ServiceClientBuilder(serviceClients = {IotHubClientImpl.class})
+public final class IotHubClientBuilder {
+ /*
+ * The subscription identifier.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The subscription identifier.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the IotHubClientBuilder.
+ */
+ public IotHubClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the IotHubClientBuilder.
+ */
+ public IotHubClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the IotHubClientBuilder.
+ */
+ public IotHubClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the IotHubClientBuilder.
+ */
+ public IotHubClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the IotHubClientBuilder.
+ */
+ public IotHubClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the IotHubClientBuilder.
+ */
+ public IotHubClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of IotHubClientImpl with the provided parameters.
+ *
+ * @return an instance of IotHubClientImpl.
+ */
+ public IotHubClientImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ 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();
+ }
+ IotHubClientImpl client =
+ new IotHubClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
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
new file mode 100644
index 0000000000000..589e0bb3e3949
--- /dev/null
+++ b/sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubClientImpl.java
@@ -0,0 +1,377 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.iothub.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+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.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.iothub.fluent.CertificatesClient;
+import com.azure.resourcemanager.iothub.fluent.IotHubClient;
+import com.azure.resourcemanager.iothub.fluent.IotHubResourcesClient;
+import com.azure.resourcemanager.iothub.fluent.IotHubsClient;
+import com.azure.resourcemanager.iothub.fluent.OperationsClient;
+import com.azure.resourcemanager.iothub.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.iothub.fluent.PrivateLinkResourcesOperationsClient;
+import com.azure.resourcemanager.iothub.fluent.ResourceProviderCommonsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+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;
+
+ /**
+ * Gets The subscription identifier.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** Api Version. */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The serializer to serialize an object into a string. */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /** The default poll interval for long-running operation. */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The IotHubResourcesClient object to access its operations. */
+ private final IotHubResourcesClient iotHubResources;
+
+ /**
+ * Gets the IotHubResourcesClient object to access its operations.
+ *
+ * @return the IotHubResourcesClient object.
+ */
+ public IotHubResourcesClient getIotHubResources() {
+ return this.iotHubResources;
+ }
+
+ /** The ResourceProviderCommonsClient object to access its operations. */
+ private final ResourceProviderCommonsClient resourceProviderCommons;
+
+ /**
+ * Gets the ResourceProviderCommonsClient object to access its operations.
+ *
+ * @return the ResourceProviderCommonsClient object.
+ */
+ public ResourceProviderCommonsClient getResourceProviderCommons() {
+ return this.resourceProviderCommons;
+ }
+
+ /** The CertificatesClient object to access its operations. */
+ private final CertificatesClient certificates;
+
+ /**
+ * Gets the CertificatesClient object to access its operations.
+ *
+ * @return the CertificatesClient object.
+ */
+ public CertificatesClient getCertificates() {
+ return this.certificates;
+ }
+
+ /** The IotHubsClient object to access its operations. */
+ private final IotHubsClient iotHubs;
+
+ /**
+ * Gets the IotHubsClient object to access its operations.
+ *
+ * @return the IotHubsClient object.
+ */
+ public IotHubsClient getIotHubs() {
+ return this.iotHubs;
+ }
+
+ /** The PrivateLinkResourcesOperationsClient object to access its operations. */
+ private final PrivateLinkResourcesOperationsClient privateLinkResourcesOperations;
+
+ /**
+ * Gets the PrivateLinkResourcesOperationsClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesOperationsClient object.
+ */
+ public PrivateLinkResourcesOperationsClient getPrivateLinkResourcesOperations() {
+ return this.privateLinkResourcesOperations;
+ }
+
+ /** The PrivateEndpointConnectionsClient object to access its operations. */
+ private final PrivateEndpointConnectionsClient privateEndpointConnections;
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Initializes an instance of IotHubClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The subscription identifier.
+ * @param endpoint server parameter.
+ */
+ IotHubClientImpl(
+ HttpPipeline httpPipeline,
+ SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval,
+ AzureEnvironment environment,
+ String subscriptionId,
+ String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2020-08-31";
+ this.operations = new OperationsClientImpl(this);
+ this.iotHubResources = new IotHubResourcesClientImpl(this);
+ this.resourceProviderCommons = new ResourceProviderCommonsClientImpl(this);
+ this.certificates = new CertificatesClientImpl(this);
+ this.iotHubs = new IotHubsClientImpl(this);
+ this.privateLinkResourcesOperations = new PrivateLinkResourcesOperationsClientImpl(this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ for (Map.Entry