diff --git a/sdk/iothub/mgmt-v2020_03_01/pom.xml b/sdk/iothub/mgmt-v2020_03_01/pom.xml
new file mode 100644
index 0000000000000..d5ee3095abad8
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/pom.xml
@@ -0,0 +1,135 @@
+
+
+ 4.0.0
+ com.microsoft.azure.iothub.v2020_03_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
+
+ azure-mgmt-devices
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for Devices Management
+ This package contains Microsoft Devices Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+ 1.6.5
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+ ]]>
+
+
+
+
+
+
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/AccessRights.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/AccessRights.java
new file mode 100644
index 0000000000000..691fd93d7c4bd
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/AccessRights.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for AccessRights.
+ */
+public enum AccessRights {
+ /** Enum value RegistryRead. */
+ REGISTRY_READ("RegistryRead"),
+
+ /** Enum value RegistryWrite. */
+ REGISTRY_WRITE("RegistryWrite"),
+
+ /** Enum value ServiceConnect. */
+ SERVICE_CONNECT("ServiceConnect"),
+
+ /** Enum value DeviceConnect. */
+ DEVICE_CONNECT("DeviceConnect"),
+
+ /** Enum value RegistryRead, RegistryWrite. */
+ REGISTRY_READ_REGISTRY_WRITE("RegistryRead, RegistryWrite"),
+
+ /** Enum value RegistryRead, ServiceConnect. */
+ REGISTRY_READ_SERVICE_CONNECT("RegistryRead, ServiceConnect"),
+
+ /** Enum value RegistryRead, DeviceConnect. */
+ REGISTRY_READ_DEVICE_CONNECT("RegistryRead, DeviceConnect"),
+
+ /** Enum value RegistryWrite, ServiceConnect. */
+ REGISTRY_WRITE_SERVICE_CONNECT("RegistryWrite, ServiceConnect"),
+
+ /** Enum value RegistryWrite, DeviceConnect. */
+ REGISTRY_WRITE_DEVICE_CONNECT("RegistryWrite, DeviceConnect"),
+
+ /** Enum value ServiceConnect, DeviceConnect. */
+ SERVICE_CONNECT_DEVICE_CONNECT("ServiceConnect, DeviceConnect"),
+
+ /** Enum value RegistryRead, RegistryWrite, ServiceConnect. */
+ REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT("RegistryRead, RegistryWrite, ServiceConnect"),
+
+ /** Enum value RegistryRead, RegistryWrite, DeviceConnect. */
+ REGISTRY_READ_REGISTRY_WRITE_DEVICE_CONNECT("RegistryRead, RegistryWrite, DeviceConnect"),
+
+ /** Enum value RegistryRead, ServiceConnect, DeviceConnect. */
+ REGISTRY_READ_SERVICE_CONNECT_DEVICE_CONNECT("RegistryRead, ServiceConnect, DeviceConnect"),
+
+ /** Enum value RegistryWrite, ServiceConnect, DeviceConnect. */
+ REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT("RegistryWrite, ServiceConnect, DeviceConnect"),
+
+ /** Enum value RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect. */
+ REGISTRY_READ_REGISTRY_WRITE_SERVICE_CONNECT_DEVICE_CONNECT("RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect");
+
+ /** The actual serialized value for a AccessRights instance. */
+ private String value;
+
+ AccessRights(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a AccessRights instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed AccessRights object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static AccessRights fromString(String value) {
+ AccessRights[] items = AccessRights.values();
+ for (AccessRights item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/AuthenticationType.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/AuthenticationType.java
new file mode 100644
index 0000000000000..c3005cc58f55d
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/AuthenticationType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for AuthenticationType.
+ */
+public final class AuthenticationType extends ExpandableStringEnum {
+ /** Static value keyBased for AuthenticationType. */
+ public static final AuthenticationType KEY_BASED = fromString("keyBased");
+
+ /** Static value identityBased for AuthenticationType. */
+ public static final AuthenticationType IDENTITY_BASED = fromString("identityBased");
+
+ /**
+ * Creates or finds a AuthenticationType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding AuthenticationType
+ */
+ @JsonCreator
+ public static AuthenticationType fromString(String name) {
+ return fromString(name, AuthenticationType.class);
+ }
+
+ /**
+ * @return known AuthenticationType values
+ */
+ public static Collection values() {
+ return values(AuthenticationType.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Capabilities.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Capabilities.java
new file mode 100644
index 0000000000000..bb3f929e6fee5
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Capabilities.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for Capabilities.
+ */
+public final class Capabilities extends ExpandableStringEnum {
+ /** Static value None for Capabilities. */
+ public static final Capabilities NONE = fromString("None");
+
+ /** Static value DeviceManagement for Capabilities. */
+ public static final Capabilities DEVICE_MANAGEMENT = fromString("DeviceManagement");
+
+ /**
+ * Creates or finds a Capabilities from its string representation.
+ * @param name a name to look for
+ * @return the corresponding Capabilities
+ */
+ @JsonCreator
+ public static Capabilities fromString(String name) {
+ return fromString(name, Capabilities.class);
+ }
+
+ /**
+ * @return known Capabilities values
+ */
+ public static Collection values() {
+ return values(Capabilities.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateBodyDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateBodyDescription.java
new file mode 100644
index 0000000000000..6b1fe200e64cd
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateBodyDescription.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The JSON-serialized X509 Certificate.
+ */
+public class CertificateBodyDescription {
+ /**
+ * base-64 representation of the X509 leaf certificate .cer file or just
+ * .pem file content.
+ */
+ @JsonProperty(value = "certificate")
+ private String certificate;
+
+ /**
+ * Get base-64 representation of the X509 leaf certificate .cer file or just .pem file content.
+ *
+ * @return the certificate value
+ */
+ public String certificate() {
+ return this.certificate;
+ }
+
+ /**
+ * Set base-64 representation of the X509 leaf certificate .cer file or just .pem file content.
+ *
+ * @param certificate the certificate value to set
+ * @return the CertificateBodyDescription object itself.
+ */
+ public CertificateBodyDescription withCertificate(String certificate) {
+ this.certificate = certificate;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateDescription.java
new file mode 100644
index 0000000000000..5a4bbd9bc3f5e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateDescription.java
@@ -0,0 +1,146 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.CertificateDescriptionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+
+/**
+ * Type representing CertificateDescription.
+ */
+public interface CertificateDescription extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ CertificateProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the CertificateDescription definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithIotHub, DefinitionStages.WithIfMatch, DefinitionStages.WithCertificate, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of CertificateDescription definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a CertificateDescription definition.
+ */
+ interface Blank extends WithIotHub {
+ }
+
+ /**
+ * The stage of the certificatedescription definition allowing to specify IotHub.
+ */
+ interface WithIotHub {
+ /**
+ * Specifies resourceGroupName, resourceName.
+ * @param resourceGroupName The name of the resource group that contains the IoT hub
+ * @param resourceName The name of the IoT hub
+ * @return the next definition stage
+ */
+ WithIfMatch withExistingIotHub(String resourceGroupName, String resourceName);
+ }
+
+ /**
+ * The stage of the certificatedescription definition allowing to specify IfMatch.
+ */
+ interface WithIfMatch {
+ /**
+ * Specifies ifMatch.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate
+ * @return the next definition stage
+ */
+ WithCertificate withIfMatch(String ifMatch);
+ }
+
+ /**
+ * The stage of the certificatedescription definition allowing to specify Certificate.
+ */
+ interface WithCertificate {
+ /**
+ * Specifies certificate.
+ * @param certificate base-64 representation of the X509 leaf certificate .cer file or just .pem file content
+ * @return the next definition stage
+ */
+ WithCreate withCertificate(String certificate);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a CertificateDescription update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithIfMatch, UpdateStages.WithCertificate {
+ }
+
+ /**
+ * Grouping of CertificateDescription update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the certificatedescription update allowing to specify IfMatch.
+ */
+ interface WithIfMatch {
+ /**
+ * Specifies ifMatch.
+ * @param ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate
+ * @return the next update stage
+ */
+ Update withIfMatch(String ifMatch);
+ }
+
+ /**
+ * The stage of the certificatedescription update allowing to specify Certificate.
+ */
+ interface WithCertificate {
+ /**
+ * Specifies certificate.
+ * @param certificate base-64 representation of the X509 leaf certificate .cer file or just .pem file content
+ * @return the next update stage
+ */
+ Update withCertificate(String certificate);
+ }
+
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateListDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateListDescription.java
new file mode 100644
index 0000000000000..3342143b35bee
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateListDescription.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.CertificateListDescriptionInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.CertificateDescriptionInner;
+import java.util.List;
+
+/**
+ * Type representing CertificateListDescription.
+ */
+public interface CertificateListDescription extends HasInner, HasManager {
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateProperties.java
new file mode 100644
index 0000000000000..8b9a3b5ee42c8
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateProperties.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.rest.DateTimeRfc1123;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The description of an X509 CA Certificate.
+ */
+public class CertificateProperties {
+ /**
+ * The certificate's subject name.
+ */
+ @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY)
+ private String subject;
+
+ /**
+ * The certificate's expiration date and time.
+ */
+ @JsonProperty(value = "expiry", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 expiry;
+
+ /**
+ * The certificate's thumbprint.
+ */
+ @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY)
+ private String thumbprint;
+
+ /**
+ * Determines whether certificate has been verified.
+ */
+ @JsonProperty(value = "isVerified", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isVerified;
+
+ /**
+ * The certificate's create date and time.
+ */
+ @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 created;
+
+ /**
+ * The certificate's last update date and time.
+ */
+ @JsonProperty(value = "updated", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 updated;
+
+ /**
+ * The certificate content.
+ */
+ @JsonProperty(value = "certificate")
+ private String certificate;
+
+ /**
+ * Get the certificate's subject name.
+ *
+ * @return the subject value
+ */
+ public String subject() {
+ return this.subject;
+ }
+
+ /**
+ * Get the certificate's expiration date and time.
+ *
+ * @return the expiry value
+ */
+ public DateTime expiry() {
+ if (this.expiry == null) {
+ return null;
+ }
+ return this.expiry.dateTime();
+ }
+
+ /**
+ * Get the certificate's thumbprint.
+ *
+ * @return the thumbprint value
+ */
+ public String thumbprint() {
+ return this.thumbprint;
+ }
+
+ /**
+ * Get determines whether certificate has been verified.
+ *
+ * @return the isVerified value
+ */
+ public Boolean isVerified() {
+ return this.isVerified;
+ }
+
+ /**
+ * Get the certificate's create date and time.
+ *
+ * @return the created value
+ */
+ public DateTime created() {
+ if (this.created == null) {
+ return null;
+ }
+ return this.created.dateTime();
+ }
+
+ /**
+ * Get the certificate's last update date and time.
+ *
+ * @return the updated value
+ */
+ public DateTime updated() {
+ if (this.updated == null) {
+ return null;
+ }
+ return this.updated.dateTime();
+ }
+
+ /**
+ * Get the certificate content.
+ *
+ * @return the certificate value
+ */
+ public String certificate() {
+ return this.certificate;
+ }
+
+ /**
+ * Set the certificate content.
+ *
+ * @param certificate the certificate value to set
+ * @return the CertificateProperties object itself.
+ */
+ public CertificateProperties withCertificate(String certificate) {
+ this.certificate = certificate;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificatePropertiesWithNonce.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificatePropertiesWithNonce.java
new file mode 100644
index 0000000000000..09c18c4eee3af
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificatePropertiesWithNonce.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.rest.DateTimeRfc1123;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The description of an X509 CA Certificate including the challenge nonce
+ * issued for the Proof-Of-Possession flow.
+ */
+public class CertificatePropertiesWithNonce {
+ /**
+ * The certificate's subject name.
+ */
+ @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY)
+ private String subject;
+
+ /**
+ * The certificate's expiration date and time.
+ */
+ @JsonProperty(value = "expiry", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 expiry;
+
+ /**
+ * The certificate's thumbprint.
+ */
+ @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY)
+ private String thumbprint;
+
+ /**
+ * Determines whether certificate has been verified.
+ */
+ @JsonProperty(value = "isVerified", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isVerified;
+
+ /**
+ * The certificate's create date and time.
+ */
+ @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 created;
+
+ /**
+ * The certificate's last update date and time.
+ */
+ @JsonProperty(value = "updated", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTimeRfc1123 updated;
+
+ /**
+ * The certificate's verification code that will be used for proof of
+ * possession.
+ */
+ @JsonProperty(value = "verificationCode", access = JsonProperty.Access.WRITE_ONLY)
+ private String verificationCode;
+
+ /**
+ * The certificate content.
+ */
+ @JsonProperty(value = "certificate", access = JsonProperty.Access.WRITE_ONLY)
+ private String certificate;
+
+ /**
+ * Get the certificate's subject name.
+ *
+ * @return the subject value
+ */
+ public String subject() {
+ return this.subject;
+ }
+
+ /**
+ * Get the certificate's expiration date and time.
+ *
+ * @return the expiry value
+ */
+ public DateTime expiry() {
+ if (this.expiry == null) {
+ return null;
+ }
+ return this.expiry.dateTime();
+ }
+
+ /**
+ * Get the certificate's thumbprint.
+ *
+ * @return the thumbprint value
+ */
+ public String thumbprint() {
+ return this.thumbprint;
+ }
+
+ /**
+ * Get determines whether certificate has been verified.
+ *
+ * @return the isVerified value
+ */
+ public Boolean isVerified() {
+ return this.isVerified;
+ }
+
+ /**
+ * Get the certificate's create date and time.
+ *
+ * @return the created value
+ */
+ public DateTime created() {
+ if (this.created == null) {
+ return null;
+ }
+ return this.created.dateTime();
+ }
+
+ /**
+ * Get the certificate's last update date and time.
+ *
+ * @return the updated value
+ */
+ public DateTime updated() {
+ if (this.updated == null) {
+ return null;
+ }
+ return this.updated.dateTime();
+ }
+
+ /**
+ * Get the certificate's verification code that will be used for proof of possession.
+ *
+ * @return the verificationCode value
+ */
+ public String verificationCode() {
+ return this.verificationCode;
+ }
+
+ /**
+ * Get the certificate content.
+ *
+ * @return the certificate value
+ */
+ public String certificate() {
+ return this.certificate;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateVerificationDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateVerificationDescription.java
new file mode 100644
index 0000000000000..1f0b6c82a760b
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateVerificationDescription.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The JSON-serialized leaf certificate.
+ */
+public class CertificateVerificationDescription {
+ /**
+ * base-64 representation of X509 certificate .cer file or just .pem file
+ * content.
+ */
+ @JsonProperty(value = "certificate")
+ private String certificate;
+
+ /**
+ * Get base-64 representation of X509 certificate .cer file or just .pem file content.
+ *
+ * @return the certificate value
+ */
+ public String certificate() {
+ return this.certificate;
+ }
+
+ /**
+ * Set base-64 representation of X509 certificate .cer file or just .pem file content.
+ *
+ * @param certificate the certificate value to set
+ * @return the CertificateVerificationDescription object itself.
+ */
+ public CertificateVerificationDescription withCertificate(String certificate) {
+ this.certificate = certificate;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateWithNonceDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateWithNonceDescription.java
new file mode 100644
index 0000000000000..85ac40b48999f
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CertificateWithNonceDescription.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.CertificateWithNonceDescriptionInner;
+
+/**
+ * Type representing CertificateWithNonceDescription.
+ */
+public interface CertificateWithNonceDescription extends HasInner, HasManager {
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ CertificatePropertiesWithNonce properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Certificates.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Certificates.java
new file mode 100644
index 0000000000000..77bcc1efd1197
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Certificates.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.CertificatesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Certificates.
+ */
+public interface Certificates extends SupportsCreating, HasInner {
+ /**
+ * Get the certificate list.
+ * 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
+ * @return the observable for the request
+ */
+ Observable listByIotHubAsync(String resourceGroupName, String resourceName);
+
+ /**
+ * Generate verification code for proof of possession flow.
+ * 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
+ * @return the observable for the request
+ */
+ Observable generateVerificationCodeAsync(String resourceGroupName, String resourceName, String certificateName, String ifMatch);
+
+ /**
+ * Verify certificate's private key possession.
+ * 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable verifyAsync(String resourceGroupName, String resourceName, String certificateName, String ifMatch);
+
+ /**
+ * Get the certificate.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceName, String certificateName);
+
+ /**
+ * Delete an X509 certificate.
+ * 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
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String resourceName, String certificateName, String ifMatch);
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CloudToDeviceProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CloudToDeviceProperties.java
new file mode 100644
index 0000000000000..30c457ed5b88f
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/CloudToDeviceProperties.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import org.joda.time.Period;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The IoT hub cloud-to-device messaging properties.
+ */
+public class CloudToDeviceProperties {
+ /**
+ * The max delivery count for cloud-to-device messages in the device queue.
+ * See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ */
+ @JsonProperty(value = "maxDeliveryCount")
+ private Integer maxDeliveryCount;
+
+ /**
+ * The default time to live for cloud-to-device messages in the device
+ * queue. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ */
+ @JsonProperty(value = "defaultTtlAsIso8601")
+ private Period defaultTtlAsIso8601;
+
+ /**
+ * The feedback property.
+ */
+ @JsonProperty(value = "feedback")
+ private FeedbackProperties feedback;
+
+ /**
+ * Get the max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @return the maxDeliveryCount value
+ */
+ public Integer maxDeliveryCount() {
+ return this.maxDeliveryCount;
+ }
+
+ /**
+ * Set the max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @param maxDeliveryCount the maxDeliveryCount value to set
+ * @return the CloudToDeviceProperties object itself.
+ */
+ public CloudToDeviceProperties withMaxDeliveryCount(Integer maxDeliveryCount) {
+ this.maxDeliveryCount = maxDeliveryCount;
+ return this;
+ }
+
+ /**
+ * Get the default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @return the defaultTtlAsIso8601 value
+ */
+ public Period defaultTtlAsIso8601() {
+ return this.defaultTtlAsIso8601;
+ }
+
+ /**
+ * Set the default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @param defaultTtlAsIso8601 the defaultTtlAsIso8601 value to set
+ * @return the CloudToDeviceProperties object itself.
+ */
+ public CloudToDeviceProperties withDefaultTtlAsIso8601(Period defaultTtlAsIso8601) {
+ this.defaultTtlAsIso8601 = defaultTtlAsIso8601;
+ return this;
+ }
+
+ /**
+ * Get the feedback value.
+ *
+ * @return the feedback value
+ */
+ public FeedbackProperties feedback() {
+ return this.feedback;
+ }
+
+ /**
+ * Set the feedback value.
+ *
+ * @param feedback the feedback value to set
+ * @return the CloudToDeviceProperties object itself.
+ */
+ public CloudToDeviceProperties withFeedback(FeedbackProperties feedback) {
+ this.feedback = feedback;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EndpointHealthData.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EndpointHealthData.java
new file mode 100644
index 0000000000000..cfe0a7a315057
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EndpointHealthData.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.EndpointHealthDataInner;
+
+/**
+ * Type representing EndpointHealthData.
+ */
+public interface EndpointHealthData extends HasInner, HasManager {
+ /**
+ * @return the endpointId value.
+ */
+ String endpointId();
+
+ /**
+ * @return the healthStatus value.
+ */
+ EndpointHealthStatus healthStatus();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EndpointHealthStatus.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EndpointHealthStatus.java
new file mode 100644
index 0000000000000..e0e2b2671dca5
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EndpointHealthStatus.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EndpointHealthStatus.
+ */
+public final class EndpointHealthStatus extends ExpandableStringEnum {
+ /** Static value unknown for EndpointHealthStatus. */
+ public static final EndpointHealthStatus UNKNOWN = fromString("unknown");
+
+ /** Static value healthy for EndpointHealthStatus. */
+ public static final EndpointHealthStatus HEALTHY = fromString("healthy");
+
+ /** Static value unhealthy for EndpointHealthStatus. */
+ public static final EndpointHealthStatus UNHEALTHY = fromString("unhealthy");
+
+ /** Static value dead for EndpointHealthStatus. */
+ public static final EndpointHealthStatus DEAD = fromString("dead");
+
+ /**
+ * Creates or finds a EndpointHealthStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EndpointHealthStatus
+ */
+ @JsonCreator
+ public static EndpointHealthStatus fromString(String name) {
+ return fromString(name, EndpointHealthStatus.class);
+ }
+
+ /**
+ * @return known EndpointHealthStatus values
+ */
+ public static Collection values() {
+ return values(EndpointHealthStatus.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EnrichmentProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EnrichmentProperties.java
new file mode 100644
index 0000000000000..d37d93b9b7776
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EnrichmentProperties.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of an enrichment that your IoT hub applies to messages
+ * delivered to endpoints.
+ */
+public class EnrichmentProperties {
+ /**
+ * The key or name for the enrichment property.
+ */
+ @JsonProperty(value = "key", required = true)
+ private String key;
+
+ /**
+ * The value for the enrichment property.
+ */
+ @JsonProperty(value = "value", required = true)
+ private String value;
+
+ /**
+ * The list of endpoints for which the enrichment is applied to the
+ * message.
+ */
+ @JsonProperty(value = "endpointNames", required = true)
+ private List endpointNames;
+
+ /**
+ * Get the key or name for the enrichment property.
+ *
+ * @return the key value
+ */
+ public String key() {
+ return this.key;
+ }
+
+ /**
+ * Set the key or name for the enrichment property.
+ *
+ * @param key the key value to set
+ * @return the EnrichmentProperties object itself.
+ */
+ public EnrichmentProperties withKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ /**
+ * Get the value for the enrichment property.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value for the enrichment property.
+ *
+ * @param value the value value to set
+ * @return the EnrichmentProperties object itself.
+ */
+ public EnrichmentProperties withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the list of endpoints for which the enrichment is applied to the message.
+ *
+ * @return the endpointNames value
+ */
+ public List endpointNames() {
+ return this.endpointNames;
+ }
+
+ /**
+ * Set the list of endpoints for which the enrichment is applied to the message.
+ *
+ * @param endpointNames the endpointNames value to set
+ * @return the EnrichmentProperties object itself.
+ */
+ public EnrichmentProperties withEndpointNames(List endpointNames) {
+ this.endpointNames = endpointNames;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EventHubConsumerGroupInfo.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EventHubConsumerGroupInfo.java
new file mode 100644
index 0000000000000..1dacf40270afa
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EventHubConsumerGroupInfo.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.EventHubConsumerGroupInfoInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import java.util.Map;
+
+/**
+ * Type representing EventHubConsumerGroupInfo.
+ */
+public interface EventHubConsumerGroupInfo extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ Map properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the EventHubConsumerGroupInfo definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEventHubEndpoint, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of EventHubConsumerGroupInfo definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a EventHubConsumerGroupInfo definition.
+ */
+ interface Blank extends WithEventHubEndpoint {
+ }
+
+ /**
+ * The stage of the eventhubconsumergroupinfo definition allowing to specify EventHubEndpoint.
+ */
+ interface WithEventHubEndpoint {
+ /**
+ * Specifies resourceGroupName, resourceName, eventHubEndpointName.
+ * @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
+ * @return the next definition stage
+ */
+ WithCreate withExistingEventHubEndpoint(String resourceGroupName, String resourceName, String eventHubEndpointName);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a EventHubConsumerGroupInfo update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable {
+ }
+
+ /**
+ * Grouping of EventHubConsumerGroupInfo update stages.
+ */
+ interface UpdateStages {
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EventHubProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EventHubProperties.java
new file mode 100644
index 0000000000000..c82cd331c1b5e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/EventHubProperties.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the provisioned Event Hub-compatible endpoint used by the
+ * IoT hub.
+ */
+public class EventHubProperties {
+ /**
+ * The retention time for device-to-cloud messages in days. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
+ */
+ @JsonProperty(value = "retentionTimeInDays")
+ private Long retentionTimeInDays;
+
+ /**
+ * The number of partitions for receiving device-to-cloud messages in the
+ * Event Hub-compatible endpoint. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
+ */
+ @JsonProperty(value = "partitionCount")
+ private Integer partitionCount;
+
+ /**
+ * The partition ids in the Event Hub-compatible endpoint.
+ */
+ @JsonProperty(value = "partitionIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List partitionIds;
+
+ /**
+ * The Event Hub-compatible name.
+ */
+ @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY)
+ private String path;
+
+ /**
+ * The Event Hub-compatible endpoint.
+ */
+ @JsonProperty(value = "endpoint", access = JsonProperty.Access.WRITE_ONLY)
+ private String endpoint;
+
+ /**
+ * Get the retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
+ *
+ * @return the retentionTimeInDays value
+ */
+ public Long retentionTimeInDays() {
+ return this.retentionTimeInDays;
+ }
+
+ /**
+ * Set the retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
+ *
+ * @param retentionTimeInDays the retentionTimeInDays value to set
+ * @return the EventHubProperties object itself.
+ */
+ public EventHubProperties withRetentionTimeInDays(Long retentionTimeInDays) {
+ this.retentionTimeInDays = retentionTimeInDays;
+ return this;
+ }
+
+ /**
+ * Get the number of partitions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
+ *
+ * @return the partitionCount value
+ */
+ public Integer partitionCount() {
+ return this.partitionCount;
+ }
+
+ /**
+ * Set the number of partitions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
+ *
+ * @param partitionCount the partitionCount value to set
+ * @return the EventHubProperties object itself.
+ */
+ public EventHubProperties withPartitionCount(Integer partitionCount) {
+ this.partitionCount = partitionCount;
+ return this;
+ }
+
+ /**
+ * Get the partition ids in the Event Hub-compatible endpoint.
+ *
+ * @return the partitionIds value
+ */
+ public List partitionIds() {
+ return this.partitionIds;
+ }
+
+ /**
+ * Get the Event Hub-compatible name.
+ *
+ * @return the path value
+ */
+ public String path() {
+ return this.path;
+ }
+
+ /**
+ * Get the Event Hub-compatible endpoint.
+ *
+ * @return the endpoint value
+ */
+ public String endpoint() {
+ return this.endpoint;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ExportDevicesRequest.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ExportDevicesRequest.java
new file mode 100644
index 0000000000000..002c2c1f815aa
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ExportDevicesRequest.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Use to provide parameters when requesting an export of all devices in the
+ * IoT hub.
+ */
+public class ExportDevicesRequest {
+ /**
+ * The export blob container URI.
+ */
+ @JsonProperty(value = "exportBlobContainerUri", required = true)
+ private String exportBlobContainerUri;
+
+ /**
+ * The value indicating whether keys should be excluded during export.
+ */
+ @JsonProperty(value = "excludeKeys", required = true)
+ private boolean excludeKeys;
+
+ /**
+ * The name of the blob that will be created in the provided output blob
+ * container. This blob will contain the exported device registry
+ * information for the IoT Hub.
+ */
+ @JsonProperty(value = "exportBlobName")
+ private String exportBlobName;
+
+ /**
+ * Specifies authentication type being used for connecting to the storage
+ * account. Possible values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * Get the export blob container URI.
+ *
+ * @return the exportBlobContainerUri value
+ */
+ public String exportBlobContainerUri() {
+ return this.exportBlobContainerUri;
+ }
+
+ /**
+ * Set the export blob container URI.
+ *
+ * @param exportBlobContainerUri the exportBlobContainerUri value to set
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withExportBlobContainerUri(String exportBlobContainerUri) {
+ this.exportBlobContainerUri = exportBlobContainerUri;
+ return this;
+ }
+
+ /**
+ * Get the value indicating whether keys should be excluded during export.
+ *
+ * @return the excludeKeys value
+ */
+ public boolean excludeKeys() {
+ return this.excludeKeys;
+ }
+
+ /**
+ * Set the value indicating whether keys should be excluded during export.
+ *
+ * @param excludeKeys the excludeKeys value to set
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withExcludeKeys(boolean excludeKeys) {
+ this.excludeKeys = excludeKeys;
+ return this;
+ }
+
+ /**
+ * Get the name of the blob that will be created in the provided output blob container. This blob will contain the exported device registry information for the IoT Hub.
+ *
+ * @return the exportBlobName value
+ */
+ public String exportBlobName() {
+ return this.exportBlobName;
+ }
+
+ /**
+ * Set the name of the blob that will be created in the provided output blob container. This blob will contain the exported device registry information for the IoT Hub.
+ *
+ * @param exportBlobName the exportBlobName value to set
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withExportBlobName(String exportBlobName) {
+ this.exportBlobName = exportBlobName;
+ return this;
+ }
+
+ /**
+ * Get specifies authentication type being used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set specifies authentication type being used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the ExportDevicesRequest object itself.
+ */
+ public ExportDevicesRequest withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FailoverInput.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FailoverInput.java
new file mode 100644
index 0000000000000..ba3732e00dcc9
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FailoverInput.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Use to provide failover region when requesting manual Failover for a hub.
+ */
+public class FailoverInput {
+ /**
+ * Region the hub will be failed over to.
+ */
+ @JsonProperty(value = "failoverRegion", required = true)
+ private String failoverRegion;
+
+ /**
+ * Get region the hub will be failed over to.
+ *
+ * @return the failoverRegion value
+ */
+ public String failoverRegion() {
+ return this.failoverRegion;
+ }
+
+ /**
+ * Set region the hub will be failed over to.
+ *
+ * @param failoverRegion the failoverRegion value to set
+ * @return the FailoverInput object itself.
+ */
+ public FailoverInput withFailoverRegion(String failoverRegion) {
+ this.failoverRegion = failoverRegion;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FallbackRouteProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FallbackRouteProperties.java
new file mode 100644
index 0000000000000..b8c3af3a3be95
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FallbackRouteProperties.java
@@ -0,0 +1,165 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the fallback route. IoT Hub uses these properties when it
+ * routes messages to the fallback endpoint.
+ */
+public class FallbackRouteProperties {
+ /**
+ * The name of the route. The name can only include alphanumeric
+ * characters, periods, underscores, hyphens, has a maximum length of 64
+ * characters, and must be unique.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * The source to which the routing rule is to be applied to. For example,
+ * DeviceMessages.
+ */
+ @JsonProperty(value = "source", required = true)
+ private String source;
+
+ /**
+ * The condition which is evaluated in order to apply the fallback route.
+ * If the condition is not provided it will evaluate to true by default.
+ * For grammar, See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
+ */
+ @JsonProperty(value = "condition")
+ private String condition;
+
+ /**
+ * The list of endpoints to which the messages that satisfy the condition
+ * are routed to. Currently only 1 endpoint is allowed.
+ */
+ @JsonProperty(value = "endpointNames", required = true)
+ private List endpointNames;
+
+ /**
+ * Used to specify whether the fallback route is enabled.
+ */
+ @JsonProperty(value = "isEnabled", required = true)
+ private boolean isEnabled;
+
+ /**
+ * Creates an instance of FallbackRouteProperties class.
+ * @param endpointNames the list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed.
+ * @param isEnabled used to specify whether the fallback route is enabled.
+ */
+ public FallbackRouteProperties() {
+ source = "DeviceMessages";
+ }
+
+ /**
+ * Get the name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
+ *
+ * @param name the name value to set
+ * @return the FallbackRouteProperties object itself.
+ */
+ public FallbackRouteProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the source to which the routing rule is to be applied to. For example, DeviceMessages.
+ *
+ * @return the source value
+ */
+ public String source() {
+ return this.source;
+ }
+
+ /**
+ * Set the source to which the routing rule is to be applied to. For example, DeviceMessages.
+ *
+ * @param source the source value to set
+ * @return the FallbackRouteProperties object itself.
+ */
+ public FallbackRouteProperties withSource(String source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
+ *
+ * @return the condition value
+ */
+ public String condition() {
+ return this.condition;
+ }
+
+ /**
+ * Set the condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
+ *
+ * @param condition the condition value to set
+ * @return the FallbackRouteProperties object itself.
+ */
+ public FallbackRouteProperties withCondition(String condition) {
+ this.condition = condition;
+ return this;
+ }
+
+ /**
+ * Get the list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed.
+ *
+ * @return the endpointNames value
+ */
+ public List endpointNames() {
+ return this.endpointNames;
+ }
+
+ /**
+ * Set the list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed.
+ *
+ * @param endpointNames the endpointNames value to set
+ * @return the FallbackRouteProperties object itself.
+ */
+ public FallbackRouteProperties withEndpointNames(List endpointNames) {
+ this.endpointNames = endpointNames;
+ return this;
+ }
+
+ /**
+ * Get used to specify whether the fallback route is enabled.
+ *
+ * @return the isEnabled value
+ */
+ public boolean isEnabled() {
+ return this.isEnabled;
+ }
+
+ /**
+ * Set used to specify whether the fallback route is enabled.
+ *
+ * @param isEnabled the isEnabled value to set
+ * @return the FallbackRouteProperties object itself.
+ */
+ public FallbackRouteProperties withIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FeedbackProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FeedbackProperties.java
new file mode 100644
index 0000000000000..7cbc517e77968
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/FeedbackProperties.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import org.joda.time.Period;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the feedback queue for cloud-to-device messages.
+ */
+public class FeedbackProperties {
+ /**
+ * The lock duration for the feedback queue. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ */
+ @JsonProperty(value = "lockDurationAsIso8601")
+ private Period lockDurationAsIso8601;
+
+ /**
+ * The period of time for which a message is available to consume before it
+ * is expired by the IoT hub. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ */
+ @JsonProperty(value = "ttlAsIso8601")
+ private Period ttlAsIso8601;
+
+ /**
+ * The number of times the IoT hub attempts to deliver a message on the
+ * feedback queue. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ */
+ @JsonProperty(value = "maxDeliveryCount")
+ private Integer maxDeliveryCount;
+
+ /**
+ * Get the lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @return the lockDurationAsIso8601 value
+ */
+ public Period lockDurationAsIso8601() {
+ return this.lockDurationAsIso8601;
+ }
+
+ /**
+ * Set the lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @param lockDurationAsIso8601 the lockDurationAsIso8601 value to set
+ * @return the FeedbackProperties object itself.
+ */
+ public FeedbackProperties withLockDurationAsIso8601(Period lockDurationAsIso8601) {
+ this.lockDurationAsIso8601 = lockDurationAsIso8601;
+ return this;
+ }
+
+ /**
+ * Get the period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @return the ttlAsIso8601 value
+ */
+ public Period ttlAsIso8601() {
+ return this.ttlAsIso8601;
+ }
+
+ /**
+ * Set the period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @param ttlAsIso8601 the ttlAsIso8601 value to set
+ * @return the FeedbackProperties object itself.
+ */
+ public FeedbackProperties withTtlAsIso8601(Period ttlAsIso8601) {
+ this.ttlAsIso8601 = ttlAsIso8601;
+ return this;
+ }
+
+ /**
+ * Get the number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @return the maxDeliveryCount value
+ */
+ public Integer maxDeliveryCount() {
+ return this.maxDeliveryCount;
+ }
+
+ /**
+ * Set the number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
+ *
+ * @param maxDeliveryCount the maxDeliveryCount value to set
+ * @return the FeedbackProperties object itself.
+ */
+ public FeedbackProperties withMaxDeliveryCount(Integer maxDeliveryCount) {
+ this.maxDeliveryCount = maxDeliveryCount;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/GroupIdInformation.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/GroupIdInformation.java
new file mode 100644
index 0000000000000..06bb482cdf7dc
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/GroupIdInformation.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.GroupIdInformationInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+
+/**
+ * Type representing GroupIdInformation.
+ */
+public interface GroupIdInformation extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ GroupIdInformationProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/GroupIdInformationProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/GroupIdInformationProperties.java
new file mode 100644
index 0000000000000..c307aab62be6a
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/GroupIdInformationProperties.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties for a group information object.
+ */
+public class GroupIdInformationProperties {
+ /**
+ * The group id.
+ */
+ @JsonProperty(value = "groupId")
+ private String groupId;
+
+ /**
+ * The required members for a specific group id.
+ */
+ @JsonProperty(value = "requiredMembers")
+ private List requiredMembers;
+
+ /**
+ * The required DNS zones for a specific group id.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the group id.
+ *
+ * @return the groupId value
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Set the group id.
+ *
+ * @param groupId the groupId value to set
+ * @return the GroupIdInformationProperties object itself.
+ */
+ public GroupIdInformationProperties withGroupId(String groupId) {
+ this.groupId = groupId;
+ return this;
+ }
+
+ /**
+ * Get the required members for a specific group id.
+ *
+ * @return the requiredMembers value
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Set the required members for a specific group id.
+ *
+ * @param requiredMembers the requiredMembers value to set
+ * @return the GroupIdInformationProperties object itself.
+ */
+ public GroupIdInformationProperties withRequiredMembers(List requiredMembers) {
+ this.requiredMembers = requiredMembers;
+ return this;
+ }
+
+ /**
+ * Get the required DNS zones for a specific group id.
+ *
+ * @return the requiredZoneNames value
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the required DNS zones for a specific group id.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set
+ * @return the GroupIdInformationProperties object itself.
+ */
+ public GroupIdInformationProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ImportDevicesRequest.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ImportDevicesRequest.java
new file mode 100644
index 0000000000000..c99b5e627e75e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ImportDevicesRequest.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Use to provide parameters when requesting an import of all devices in the
+ * hub.
+ */
+public class ImportDevicesRequest {
+ /**
+ * The input blob container URI.
+ */
+ @JsonProperty(value = "inputBlobContainerUri", required = true)
+ private String inputBlobContainerUri;
+
+ /**
+ * The output blob container URI.
+ */
+ @JsonProperty(value = "outputBlobContainerUri", required = true)
+ private String outputBlobContainerUri;
+
+ /**
+ * The blob name to be used when importing from the provided input blob
+ * container.
+ */
+ @JsonProperty(value = "inputBlobName")
+ private String inputBlobName;
+
+ /**
+ * The blob name to use for storing the status of the import job.
+ */
+ @JsonProperty(value = "outputBlobName")
+ private String outputBlobName;
+
+ /**
+ * Specifies authentication type being used for connecting to the storage
+ * account. Possible values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * Get the input blob container URI.
+ *
+ * @return the inputBlobContainerUri value
+ */
+ public String inputBlobContainerUri() {
+ return this.inputBlobContainerUri;
+ }
+
+ /**
+ * Set the input blob container URI.
+ *
+ * @param inputBlobContainerUri the inputBlobContainerUri value to set
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withInputBlobContainerUri(String inputBlobContainerUri) {
+ this.inputBlobContainerUri = inputBlobContainerUri;
+ return this;
+ }
+
+ /**
+ * Get the output blob container URI.
+ *
+ * @return the outputBlobContainerUri value
+ */
+ public String outputBlobContainerUri() {
+ return this.outputBlobContainerUri;
+ }
+
+ /**
+ * Set the output blob container URI.
+ *
+ * @param outputBlobContainerUri the outputBlobContainerUri value to set
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withOutputBlobContainerUri(String outputBlobContainerUri) {
+ this.outputBlobContainerUri = outputBlobContainerUri;
+ return this;
+ }
+
+ /**
+ * Get the blob name to be used when importing from the provided input blob container.
+ *
+ * @return the inputBlobName value
+ */
+ public String inputBlobName() {
+ return this.inputBlobName;
+ }
+
+ /**
+ * Set the blob name to be used when importing from the provided input blob container.
+ *
+ * @param inputBlobName the inputBlobName value to set
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withInputBlobName(String inputBlobName) {
+ this.inputBlobName = inputBlobName;
+ return this;
+ }
+
+ /**
+ * Get the blob name to use for storing the status of the import job.
+ *
+ * @return the outputBlobName value
+ */
+ public String outputBlobName() {
+ return this.outputBlobName;
+ }
+
+ /**
+ * Set the blob name to use for storing the status of the import job.
+ *
+ * @param outputBlobName the outputBlobName value to set
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withOutputBlobName(String outputBlobName) {
+ this.outputBlobName = outputBlobName;
+ return this;
+ }
+
+ /**
+ * Get specifies authentication type being used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set specifies authentication type being used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the ImportDevicesRequest object itself.
+ */
+ public ImportDevicesRequest withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubCapacity.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubCapacity.java
new file mode 100644
index 0000000000000..d1190cabc0531
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubCapacity.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * IoT Hub capacity information.
+ */
+public class IotHubCapacity {
+ /**
+ * The minimum number of units.
+ */
+ @JsonProperty(value = "minimum", access = JsonProperty.Access.WRITE_ONLY)
+ private Long minimum;
+
+ /**
+ * The maximum number of units.
+ */
+ @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY)
+ private Long maximum;
+
+ /**
+ * The default number of units.
+ */
+ @JsonProperty(value = "default", access = JsonProperty.Access.WRITE_ONLY)
+ private Long defaultProperty;
+
+ /**
+ * The type of the scaling enabled. Possible values include: 'Automatic',
+ * 'Manual', 'None'.
+ */
+ @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY)
+ private IotHubScaleType scaleType;
+
+ /**
+ * Get the minimum number of units.
+ *
+ * @return the minimum value
+ */
+ public Long minimum() {
+ return this.minimum;
+ }
+
+ /**
+ * Get the maximum number of units.
+ *
+ * @return the maximum value
+ */
+ public Long maximum() {
+ return this.maximum;
+ }
+
+ /**
+ * Get the default number of units.
+ *
+ * @return the defaultProperty value
+ */
+ public Long defaultProperty() {
+ return this.defaultProperty;
+ }
+
+ /**
+ * Get the type of the scaling enabled. Possible values include: 'Automatic', 'Manual', 'None'.
+ *
+ * @return the scaleType value
+ */
+ public IotHubScaleType scaleType() {
+ return this.scaleType;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubDescription.java
new file mode 100644
index 0000000000000..0865d65eff2cb
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubDescription.java
@@ -0,0 +1,167 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.IotHubDescriptionInner;
+
+/**
+ * Type representing IotHubDescription.
+ */
+public interface IotHubDescription extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the etag value.
+ */
+ String etag();
+
+ /**
+ * @return the properties value.
+ */
+ IotHubProperties properties();
+
+ /**
+ * @return the sku value.
+ */
+ IotHubSkuInfo sku();
+
+ /**
+ * The entirety of the IotHubDescription definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithIfMatch, DefinitionStages.WithSku, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of IotHubDescription definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a IotHubDescription definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the IotHubDescription definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the iothubdescription definition allowing to specify IfMatch.
+ */
+ interface WithIfMatch {
+ /**
+ * Specifies ifMatch.
+ * @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub
+ * @return the next definition stage
+*/
+ WithSku withIfMatch(String ifMatch);
+ }
+
+ /**
+ * The stage of the iothubdescription definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku IotHub SKU info
+ * @return the next definition stage
+*/
+ WithCreate withSku(IotHubSkuInfo sku);
+ }
+
+ /**
+ * The stage of the iothubdescription definition allowing to specify Etag.
+ */
+ interface WithEtag {
+ /**
+ * Specifies etag.
+ * @param etag 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 next definition stage
+ */
+ WithCreate withEtag(String etag);
+ }
+
+ /**
+ * The stage of the iothubdescription definition allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties IotHub properties
+ * @return the next definition stage
+ */
+ WithCreate withProperties(IotHubProperties properties);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithEtag, DefinitionStages.WithProperties {
+ }
+ }
+ /**
+ * The template for a IotHubDescription update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIfMatch, UpdateStages.WithEtag, UpdateStages.WithProperties {
+ }
+
+ /**
+ * Grouping of IotHubDescription update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the iothubdescription update allowing to specify IfMatch.
+ */
+ interface WithIfMatch {
+ /**
+ * Specifies ifMatch.
+ * @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub
+ * @return the next update stage
+ */
+ Update withIfMatch(String ifMatch);
+ }
+
+ /**
+ * The stage of the iothubdescription update allowing to specify Etag.
+ */
+ interface WithEtag {
+ /**
+ * Specifies etag.
+ * @param etag 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 next update stage
+ */
+ Update withEtag(String etag);
+ }
+
+ /**
+ * The stage of the iothubdescription update allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties IotHub properties
+ * @return the next update stage
+ */
+ Update withProperties(IotHubProperties properties);
+ }
+
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubLocationDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubLocationDescription.java
new file mode 100644
index 0000000000000..ef52792405263
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubLocationDescription.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Public representation of one of the locations where a resource is
+ * provisioned.
+ */
+public class IotHubLocationDescription {
+ /**
+ * The name of the Azure region.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * The role of the region, can be either primary or secondary. The primary
+ * region is where the IoT hub is currently provisioned. The secondary
+ * region is the Azure disaster recovery (DR) paired region and also the
+ * region where the IoT hub can failover to. Possible values include:
+ * 'primary', 'secondary'.
+ */
+ @JsonProperty(value = "role")
+ private IotHubReplicaRoleType role;
+
+ /**
+ * Get the name of the Azure region.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the name of the Azure region.
+ *
+ * @param location the location value to set
+ * @return the IotHubLocationDescription object itself.
+ */
+ public IotHubLocationDescription withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary'.
+ *
+ * @return the role value
+ */
+ public IotHubReplicaRoleType role() {
+ return this.role;
+ }
+
+ /**
+ * Set the role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to. Possible values include: 'primary', 'secondary'.
+ *
+ * @param role the role value to set
+ * @return the IotHubLocationDescription object itself.
+ */
+ public IotHubLocationDescription withRole(IotHubReplicaRoleType role) {
+ this.role = role;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubNameAvailabilityInfo.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubNameAvailabilityInfo.java
new file mode 100644
index 0000000000000..ac6bb55ba33ba
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubNameAvailabilityInfo.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.IotHubNameAvailabilityInfoInner;
+
+/**
+ * Type representing IotHubNameAvailabilityInfo.
+ */
+public interface IotHubNameAvailabilityInfo extends HasInner, HasManager {
+ /**
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * @return the nameAvailable value.
+ */
+ Boolean nameAvailable();
+
+ /**
+ * @return the reason value.
+ */
+ IotHubNameUnavailabilityReason reason();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubNameUnavailabilityReason.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubNameUnavailabilityReason.java
new file mode 100644
index 0000000000000..d911330fa8f7b
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubNameUnavailabilityReason.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IotHubNameUnavailabilityReason.
+ */
+public enum IotHubNameUnavailabilityReason {
+ /** Enum value Invalid. */
+ INVALID("Invalid"),
+
+ /** Enum value AlreadyExists. */
+ ALREADY_EXISTS("AlreadyExists");
+
+ /** The actual serialized value for a IotHubNameUnavailabilityReason instance. */
+ private String value;
+
+ IotHubNameUnavailabilityReason(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a IotHubNameUnavailabilityReason instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed IotHubNameUnavailabilityReason object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static IotHubNameUnavailabilityReason fromString(String value) {
+ IotHubNameUnavailabilityReason[] items = IotHubNameUnavailabilityReason.values();
+ for (IotHubNameUnavailabilityReason item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubProperties.java
new file mode 100644
index 0000000000000..56eff20bf5b72
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubProperties.java
@@ -0,0 +1,431 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.SharedAccessSignatureAuthorizationRuleInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.PrivateEndpointConnectionInner;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of an IoT hub.
+ */
+public class IotHubProperties {
+ /**
+ * The shared access policies you can use to secure a connection to the IoT
+ * hub.
+ */
+ @JsonProperty(value = "authorizationPolicies")
+ private List authorizationPolicies;
+
+ /**
+ * Whether requests from Public Network are allowed. Possible values
+ * include: 'Enabled', 'Disabled'.
+ */
+ @JsonProperty(value = "publicNetworkAccess")
+ private PublicNetworkAccess publicNetworkAccess;
+
+ /**
+ * The IP filter rules.
+ */
+ @JsonProperty(value = "ipFilterRules")
+ private List ipFilterRules;
+
+ /**
+ * Specifies the minimum TLS version to support for this hub. Can be set to
+ * "1.2" to have clients that use a TLS version below 1.2 to be rejected.
+ */
+ @JsonProperty(value = "minTlsVersion")
+ private String minTlsVersion;
+
+ /**
+ * Private endpoint connections created on this IotHub.
+ */
+ @JsonProperty(value = "privateEndpointConnections")
+ private List privateEndpointConnections;
+
+ /**
+ * The provisioning state.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /**
+ * The hub state.
+ */
+ @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY)
+ private String state;
+
+ /**
+ * The name of the host.
+ */
+ @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostName;
+
+ /**
+ * The Event Hub-compatible endpoint properties. The only possible keys to
+ * this dictionary is events. This key has to be present in the dictionary
+ * while making create or update calls for the IoT hub.
+ */
+ @JsonProperty(value = "eventHubEndpoints")
+ private Map eventHubEndpoints;
+
+ /**
+ * The routing property.
+ */
+ @JsonProperty(value = "routing")
+ private RoutingProperties routing;
+
+ /**
+ * The list of Azure Storage endpoints where you can upload files.
+ * Currently you can configure only one Azure Storage account and that MUST
+ * have its key as $default. Specifying more than one storage account
+ * causes an error to be thrown. Not specifying a value for this property
+ * when the enableFileUploadNotifications property is set to True, causes
+ * an error to be thrown.
+ */
+ @JsonProperty(value = "storageEndpoints")
+ private Map storageEndpoints;
+
+ /**
+ * The messaging endpoint properties for the file upload notification
+ * queue.
+ */
+ @JsonProperty(value = "messagingEndpoints")
+ private Map messagingEndpoints;
+
+ /**
+ * If True, file upload notifications are enabled.
+ */
+ @JsonProperty(value = "enableFileUploadNotifications")
+ private Boolean enableFileUploadNotifications;
+
+ /**
+ * The cloudToDevice property.
+ */
+ @JsonProperty(value = "cloudToDevice")
+ private CloudToDeviceProperties cloudToDevice;
+
+ /**
+ * IoT hub comments.
+ */
+ @JsonProperty(value = "comments")
+ private String comments;
+
+ /**
+ * The capabilities and features enabled for the IoT hub. Possible values
+ * include: 'None', 'DeviceManagement'.
+ */
+ @JsonProperty(value = "features")
+ private Capabilities features;
+
+ /**
+ * Primary and secondary location for iot hub.
+ */
+ @JsonProperty(value = "locations", access = JsonProperty.Access.WRITE_ONLY)
+ private List locations;
+
+ /**
+ * Get the shared access policies you can use to secure a connection to the IoT hub.
+ *
+ * @return the authorizationPolicies value
+ */
+ public List authorizationPolicies() {
+ return this.authorizationPolicies;
+ }
+
+ /**
+ * Set the shared access policies you can use to secure a connection to the IoT hub.
+ *
+ * @param authorizationPolicies the authorizationPolicies value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withAuthorizationPolicies(List authorizationPolicies) {
+ this.authorizationPolicies = authorizationPolicies;
+ return this;
+ }
+
+ /**
+ * Get whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @return the publicNetworkAccess value
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set whether requests from Public Network are allowed. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
+ /**
+ * Get the IP filter rules.
+ *
+ * @return the ipFilterRules value
+ */
+ public List ipFilterRules() {
+ return this.ipFilterRules;
+ }
+
+ /**
+ * Set the IP filter rules.
+ *
+ * @param ipFilterRules the ipFilterRules value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withIpFilterRules(List ipFilterRules) {
+ this.ipFilterRules = ipFilterRules;
+ return this;
+ }
+
+ /**
+ * Get specifies the minimum TLS version to support for this hub. Can be set to "1.2" to have clients that use a TLS version below 1.2 to be rejected.
+ *
+ * @return the minTlsVersion value
+ */
+ public String minTlsVersion() {
+ return this.minTlsVersion;
+ }
+
+ /**
+ * Set specifies the minimum TLS version to support for this hub. Can be set to "1.2" to have clients that use a TLS version below 1.2 to be rejected.
+ *
+ * @param minTlsVersion the minTlsVersion value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withMinTlsVersion(String minTlsVersion) {
+ this.minTlsVersion = minTlsVersion;
+ return this;
+ }
+
+ /**
+ * Get private endpoint connections created on this IotHub.
+ *
+ * @return the privateEndpointConnections value
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Set private endpoint connections created on this IotHub.
+ *
+ * @param privateEndpointConnections the privateEndpointConnections value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withPrivateEndpointConnections(List privateEndpointConnections) {
+ this.privateEndpointConnections = privateEndpointConnections;
+ return this;
+ }
+
+ /**
+ * Get the provisioning state.
+ *
+ * @return the provisioningState value
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the hub state.
+ *
+ * @return the state value
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Get the name of the host.
+ *
+ * @return the hostName value
+ */
+ public String hostName() {
+ return this.hostName;
+ }
+
+ /**
+ * Get the Event Hub-compatible endpoint properties. The only possible keys to this dictionary is events. This key has to be present in the dictionary while making create or update calls for the IoT hub.
+ *
+ * @return the eventHubEndpoints value
+ */
+ public Map eventHubEndpoints() {
+ return this.eventHubEndpoints;
+ }
+
+ /**
+ * Set the Event Hub-compatible endpoint properties. The only possible keys to this dictionary is events. This key has to be present in the dictionary while making create or update calls for the IoT hub.
+ *
+ * @param eventHubEndpoints the eventHubEndpoints value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withEventHubEndpoints(Map eventHubEndpoints) {
+ this.eventHubEndpoints = eventHubEndpoints;
+ return this;
+ }
+
+ /**
+ * Get the routing value.
+ *
+ * @return the routing value
+ */
+ public RoutingProperties routing() {
+ return this.routing;
+ }
+
+ /**
+ * Set the routing value.
+ *
+ * @param routing the routing value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withRouting(RoutingProperties routing) {
+ this.routing = routing;
+ return this;
+ }
+
+ /**
+ * Get the list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown.
+ *
+ * @return the storageEndpoints value
+ */
+ public Map storageEndpoints() {
+ return this.storageEndpoints;
+ }
+
+ /**
+ * Set the list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown.
+ *
+ * @param storageEndpoints the storageEndpoints value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withStorageEndpoints(Map storageEndpoints) {
+ this.storageEndpoints = storageEndpoints;
+ return this;
+ }
+
+ /**
+ * Get the messaging endpoint properties for the file upload notification queue.
+ *
+ * @return the messagingEndpoints value
+ */
+ public Map messagingEndpoints() {
+ return this.messagingEndpoints;
+ }
+
+ /**
+ * Set the messaging endpoint properties for the file upload notification queue.
+ *
+ * @param messagingEndpoints the messagingEndpoints value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withMessagingEndpoints(Map messagingEndpoints) {
+ this.messagingEndpoints = messagingEndpoints;
+ return this;
+ }
+
+ /**
+ * Get if True, file upload notifications are enabled.
+ *
+ * @return the enableFileUploadNotifications value
+ */
+ public Boolean enableFileUploadNotifications() {
+ return this.enableFileUploadNotifications;
+ }
+
+ /**
+ * Set if True, file upload notifications are enabled.
+ *
+ * @param enableFileUploadNotifications the enableFileUploadNotifications value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withEnableFileUploadNotifications(Boolean enableFileUploadNotifications) {
+ this.enableFileUploadNotifications = enableFileUploadNotifications;
+ return this;
+ }
+
+ /**
+ * Get the cloudToDevice value.
+ *
+ * @return the cloudToDevice value
+ */
+ public CloudToDeviceProperties cloudToDevice() {
+ return this.cloudToDevice;
+ }
+
+ /**
+ * Set the cloudToDevice value.
+ *
+ * @param cloudToDevice the cloudToDevice value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withCloudToDevice(CloudToDeviceProperties cloudToDevice) {
+ this.cloudToDevice = cloudToDevice;
+ return this;
+ }
+
+ /**
+ * Get ioT hub comments.
+ *
+ * @return the comments value
+ */
+ public String comments() {
+ return this.comments;
+ }
+
+ /**
+ * Set ioT hub comments.
+ *
+ * @param comments the comments value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withComments(String comments) {
+ this.comments = comments;
+ return this;
+ }
+
+ /**
+ * Get the capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement'.
+ *
+ * @return the features value
+ */
+ public Capabilities features() {
+ return this.features;
+ }
+
+ /**
+ * Set the capabilities and features enabled for the IoT hub. Possible values include: 'None', 'DeviceManagement'.
+ *
+ * @param features the features value to set
+ * @return the IotHubProperties object itself.
+ */
+ public IotHubProperties withFeatures(Capabilities features) {
+ this.features = features;
+ return this;
+ }
+
+ /**
+ * Get primary and secondary location for iot hub.
+ *
+ * @return the locations value
+ */
+ public List locations() {
+ return this.locations;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubQuotaMetricInfo.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubQuotaMetricInfo.java
new file mode 100644
index 0000000000000..898d051da6f44
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubQuotaMetricInfo.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.IotHubQuotaMetricInfoInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+
+/**
+ * Type representing IotHubQuotaMetricInfo.
+ */
+public interface IotHubQuotaMetricInfo extends HasInner, HasManager {
+ /**
+ * @return the currentValue value.
+ */
+ Long currentValue();
+
+ /**
+ * @return the maxValue value.
+ */
+ Long maxValue();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubReplicaRoleType.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubReplicaRoleType.java
new file mode 100644
index 0000000000000..f6f1ec8c90e2a
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubReplicaRoleType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for IotHubReplicaRoleType.
+ */
+public final class IotHubReplicaRoleType extends ExpandableStringEnum {
+ /** Static value primary for IotHubReplicaRoleType. */
+ public static final IotHubReplicaRoleType PRIMARY = fromString("primary");
+
+ /** Static value secondary for IotHubReplicaRoleType. */
+ public static final IotHubReplicaRoleType SECONDARY = fromString("secondary");
+
+ /**
+ * Creates or finds a IotHubReplicaRoleType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding IotHubReplicaRoleType
+ */
+ @JsonCreator
+ public static IotHubReplicaRoleType fromString(String name) {
+ return fromString(name, IotHubReplicaRoleType.class);
+ }
+
+ /**
+ * @return known IotHubReplicaRoleType values
+ */
+ public static Collection values() {
+ return values(IotHubReplicaRoleType.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubResources.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubResources.java
new file mode 100644
index 0000000000000..a378a81f97b67
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubResources.java
@@ -0,0 +1,264 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.IotHubDescription;
+import rx.Completable;
+import com.microsoft.azure.management.iothub.v2020_03_01.IotHubSkuDescription;
+import com.microsoft.azure.management.iothub.v2020_03_01.EventHubConsumerGroupInfo;
+import com.microsoft.azure.management.iothub.v2020_03_01.JobResponse;
+import com.microsoft.azure.management.iothub.v2020_03_01.IotHubQuotaMetricInfo;
+
+/**
+ * Type representing IotHubResources.
+ */
+public interface IotHubResources {
+ /**
+ * Begins definition for a new IotHub resource.
+ * @param name resource name.
+ * @return the first stage of the new IotHub definition.
+ */
+ IotHubDescription.DefinitionStages.Blank defineIotHub(String name);
+
+ /**
+ * Begins definition for a new ConsumerGroup resource.
+ * @param name resource name.
+ * @return the first stage of the new ConsumerGroup definition.
+ */
+ EventHubConsumerGroupInfo.DefinitionStages.Blank defineConsumerGroup(String name);
+
+ /**
+ * Get the non-security related metadata of an IoT hub.
+ * Get the non-security related metadata of an IoT hub.
+ *
+ * @param resourceGroupName resource group name
+ * @param name resource name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceGroupAsync(String resourceGroupName, String name);
+
+ /**
+ * Get all the IoT hubs in a resource group.
+ * Get all the IoT hubs in a resource group.
+ *
+ * @param resourceGroupName resource group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupAsync(String resourceGroupName);
+
+ /**
+ * Get all the IoT hubs in a subscription.
+ * Get all the IoT hubs in a subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+ /**
+ * Delete an IoT hub.
+ * Delete an IoT hub.
+ *
+ * @param resourceGroupName resource group name
+ * @param name resource name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String name);
+
+ /**
+ * Get the health for routing endpoints.
+ * Get the health for routing endpoints.
+ *
+ * @param resourceGroupName the String value
+ * @param iotHubName the String value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getEndpointHealthAsync(final String resourceGroupName, final String iotHubName);
+
+ /**
+ * Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
+ * 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
+ * @return the observable for the request
+ */
+ Observable listKeysAsync(final String resourceGroupName, final String resourceName);
+
+ /**
+ * 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.
+ * 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
+ * @return the observable for the request
+ */
+ Observable exportDevicesAsync(String resourceGroupName, String resourceName, ExportDevicesRequest exportDevicesParameters);
+
+ /**
+ * 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.
+ * 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
+ * @return the observable for the request
+ */
+ Observable importDevicesAsync(String resourceGroupName, String resourceName, ImportDevicesRequest importDevicesParameters);
+
+ /**
+ * Check if an IoT hub name is available.
+ * Check if an IoT hub name is available.
+ *
+ * @param name The name of the IoT hub to check.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkNameAvailabilityAsync(String name);
+
+ /**
+ * Get the statistics from an IoT hub.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getStatsAsync(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the list of valid SKUs for an IoT hub.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getValidSkusAsync(final String resourceGroupName, final String resourceName);
+
+ /**
+ * Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
+
+ /**
+ * Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
+ * 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
+ * @return the observable for the request
+ */
+ Observable listEventHubConsumerGroupsAsync(final String resourceGroupName, final String resourceName, final String eventHubEndpointName);
+
+ /**
+ * Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
+ * 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
+ * @return the observable for the request
+ */
+ Completable deleteEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name);
+
+ /**
+ * 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.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getJobAsync(String resourceGroupName, String resourceName, String jobId);
+
+ /**
+ * 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.
+ * 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
+ * @return the observable for the request
+ */
+ Observable listJobsAsync(final String resourceGroupName, final String resourceName);
+
+ /**
+ * Get the quota metrics for an IoT hub.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getQuotaMetricsAsync(final String resourceGroupName, final String resourceName);
+
+ /**
+ * Test all routes.
+ * 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
+ * @return the observable for the request
+ */
+ Observable testAllRoutesAsync(String iotHubName, String resourceGroupName, TestAllRoutesInput input);
+
+ /**
+ * Test the new route.
+ * 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
+ * @return the observable for the request
+ */
+ Observable testRouteAsync(String iotHubName, String resourceGroupName, TestRouteInput input);
+
+ /**
+ * 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.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getKeysForKeyNameAsync(String resourceGroupName, String resourceName, String keyName);
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubScaleType.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubScaleType.java
new file mode 100644
index 0000000000000..94cf868376e17
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubScaleType.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IotHubScaleType.
+ */
+public enum IotHubScaleType {
+ /** Enum value Automatic. */
+ AUTOMATIC("Automatic"),
+
+ /** Enum value Manual. */
+ MANUAL("Manual"),
+
+ /** Enum value None. */
+ NONE("None");
+
+ /** The actual serialized value for a IotHubScaleType instance. */
+ private String value;
+
+ IotHubScaleType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a IotHubScaleType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed IotHubScaleType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static IotHubScaleType fromString(String value) {
+ IotHubScaleType[] items = IotHubScaleType.values();
+ for (IotHubScaleType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSku.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSku.java
new file mode 100644
index 0000000000000..1e1efc825f4be
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSku.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for IotHubSku.
+ */
+public final class IotHubSku extends ExpandableStringEnum {
+ /** Static value F1 for IotHubSku. */
+ public static final IotHubSku F1 = fromString("F1");
+
+ /** Static value S1 for IotHubSku. */
+ public static final IotHubSku S1 = fromString("S1");
+
+ /** Static value S2 for IotHubSku. */
+ public static final IotHubSku S2 = fromString("S2");
+
+ /** Static value S3 for IotHubSku. */
+ public static final IotHubSku S3 = fromString("S3");
+
+ /** Static value B1 for IotHubSku. */
+ public static final IotHubSku B1 = fromString("B1");
+
+ /** Static value B2 for IotHubSku. */
+ public static final IotHubSku B2 = fromString("B2");
+
+ /** Static value B3 for IotHubSku. */
+ public static final IotHubSku B3 = fromString("B3");
+
+ /**
+ * Creates or finds a IotHubSku from its string representation.
+ * @param name a name to look for
+ * @return the corresponding IotHubSku
+ */
+ @JsonCreator
+ public static IotHubSku fromString(String name) {
+ return fromString(name, IotHubSku.class);
+ }
+
+ /**
+ * @return known IotHubSku values
+ */
+ public static Collection values() {
+ return values(IotHubSku.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuDescription.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuDescription.java
new file mode 100644
index 0000000000000..6525bbf9d83fc
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuDescription.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.IotHubSkuDescriptionInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+
+/**
+ * Type representing IotHubSkuDescription.
+ */
+public interface IotHubSkuDescription extends HasInner, HasManager {
+ /**
+ * @return the capacity value.
+ */
+ IotHubCapacity capacity();
+
+ /**
+ * @return the resourceType value.
+ */
+ String resourceType();
+
+ /**
+ * @return the sku value.
+ */
+ IotHubSkuInfo sku();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuInfo.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuInfo.java
new file mode 100644
index 0000000000000..0bb64204eeb30
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuInfo.java
@@ -0,0 +1,87 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Information about the SKU of the IoT hub.
+ */
+public class IotHubSkuInfo {
+ /**
+ * The name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3',
+ * 'B1', 'B2', 'B3'.
+ */
+ @JsonProperty(value = "name", required = true)
+ private IotHubSku name;
+
+ /**
+ * The billing tier for the IoT hub. Possible values include: 'Free',
+ * 'Standard', 'Basic'.
+ */
+ @JsonProperty(value = "tier", access = JsonProperty.Access.WRITE_ONLY)
+ private IotHubSkuTier tier;
+
+ /**
+ * The number of provisioned IoT Hub units. See:
+ * https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.
+ */
+ @JsonProperty(value = "capacity")
+ private Long capacity;
+
+ /**
+ * Get the name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3'.
+ *
+ * @return the name value
+ */
+ public IotHubSku name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3'.
+ *
+ * @param name the name value to set
+ * @return the IotHubSkuInfo object itself.
+ */
+ public IotHubSkuInfo withName(IotHubSku name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the billing tier for the IoT hub. Possible values include: 'Free', 'Standard', 'Basic'.
+ *
+ * @return the tier value
+ */
+ public IotHubSkuTier tier() {
+ return this.tier;
+ }
+
+ /**
+ * Get the number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.
+ *
+ * @return the capacity value
+ */
+ public Long capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Set the number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.
+ *
+ * @param capacity the capacity value to set
+ * @return the IotHubSkuInfo object itself.
+ */
+ public IotHubSkuInfo withCapacity(Long capacity) {
+ this.capacity = capacity;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuTier.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuTier.java
new file mode 100644
index 0000000000000..6b4852c229732
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubSkuTier.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IotHubSkuTier.
+ */
+public enum IotHubSkuTier {
+ /** Enum value Free. */
+ FREE("Free"),
+
+ /** Enum value Standard. */
+ STANDARD("Standard"),
+
+ /** Enum value Basic. */
+ BASIC("Basic");
+
+ /** The actual serialized value for a IotHubSkuTier instance. */
+ private String value;
+
+ IotHubSkuTier(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a IotHubSkuTier instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed IotHubSkuTier object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static IotHubSkuTier fromString(String value) {
+ IotHubSkuTier[] items = IotHubSkuTier.values();
+ for (IotHubSkuTier item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubs.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubs.java
new file mode 100644
index 0000000000000..fb8763a035688
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IotHubs.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import rx.Completable;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.IotHubsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing IotHubs.
+ */
+public interface IotHubs extends HasInner {
+ /**
+ * Manually initiate a failover for the IoT Hub to its secondary region.
+ * 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 failoverRegion Region the hub will be failed over to
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable manualFailoverAsync(String iotHubName, String resourceGroupName, String failoverRegion);
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IpFilterActionType.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IpFilterActionType.java
new file mode 100644
index 0000000000000..c2dff2aaaf1c9
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IpFilterActionType.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IpFilterActionType.
+ */
+public enum IpFilterActionType {
+ /** Enum value Accept. */
+ ACCEPT("Accept"),
+
+ /** Enum value Reject. */
+ REJECT("Reject");
+
+ /** The actual serialized value for a IpFilterActionType instance. */
+ private String value;
+
+ IpFilterActionType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a IpFilterActionType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed IpFilterActionType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static IpFilterActionType fromString(String value) {
+ IpFilterActionType[] items = IpFilterActionType.values();
+ for (IpFilterActionType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IpFilterRule.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IpFilterRule.java
new file mode 100644
index 0000000000000..3fea13e03d90c
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/IpFilterRule.java
@@ -0,0 +1,97 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The IP filter rules for the IoT hub.
+ */
+public class IpFilterRule {
+ /**
+ * The name of the IP filter rule.
+ */
+ @JsonProperty(value = "filterName", required = true)
+ private String filterName;
+
+ /**
+ * The desired action for requests captured by this rule. Possible values
+ * include: 'Accept', 'Reject'.
+ */
+ @JsonProperty(value = "action", required = true)
+ private IpFilterActionType action;
+
+ /**
+ * A string that contains the IP address range in CIDR notation for the
+ * rule.
+ */
+ @JsonProperty(value = "ipMask", required = true)
+ private String ipMask;
+
+ /**
+ * Get the name of the IP filter rule.
+ *
+ * @return the filterName value
+ */
+ public String filterName() {
+ return this.filterName;
+ }
+
+ /**
+ * Set the name of the IP filter rule.
+ *
+ * @param filterName the filterName value to set
+ * @return the IpFilterRule object itself.
+ */
+ public IpFilterRule withFilterName(String filterName) {
+ this.filterName = filterName;
+ return this;
+ }
+
+ /**
+ * Get the desired action for requests captured by this rule. Possible values include: 'Accept', 'Reject'.
+ *
+ * @return the action value
+ */
+ public IpFilterActionType action() {
+ return this.action;
+ }
+
+ /**
+ * Set the desired action for requests captured by this rule. Possible values include: 'Accept', 'Reject'.
+ *
+ * @param action the action value to set
+ * @return the IpFilterRule object itself.
+ */
+ public IpFilterRule withAction(IpFilterActionType action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Get a string that contains the IP address range in CIDR notation for the rule.
+ *
+ * @return the ipMask value
+ */
+ public String ipMask() {
+ return this.ipMask;
+ }
+
+ /**
+ * Set a string that contains the IP address range in CIDR notation for the rule.
+ *
+ * @param ipMask the ipMask value to set
+ * @return the IpFilterRule object itself.
+ */
+ public IpFilterRule withIpMask(String ipMask) {
+ this.ipMask = ipMask;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobResponse.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobResponse.java
new file mode 100644
index 0000000000000..218e63e16baac
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobResponse.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.JobResponseInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.rest.DateTimeRfc1123;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing JobResponse.
+ */
+public interface JobResponse extends HasInner, HasManager {
+ /**
+ * @return the endTimeUtc value.
+ */
+ DateTime endTimeUtc();
+
+ /**
+ * @return the failureReason value.
+ */
+ String failureReason();
+
+ /**
+ * @return the jobId value.
+ */
+ String jobId();
+
+ /**
+ * @return the parentJobId value.
+ */
+ String parentJobId();
+
+ /**
+ * @return the startTimeUtc value.
+ */
+ DateTime startTimeUtc();
+
+ /**
+ * @return the status value.
+ */
+ JobStatus status();
+
+ /**
+ * @return the statusMessage value.
+ */
+ String statusMessage();
+
+ /**
+ * @return the type value.
+ */
+ JobType type();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobStatus.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobStatus.java
new file mode 100644
index 0000000000000..3d4280a90e4ea
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobStatus.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for JobStatus.
+ */
+public enum JobStatus {
+ /** Enum value unknown. */
+ UNKNOWN("unknown"),
+
+ /** Enum value enqueued. */
+ ENQUEUED("enqueued"),
+
+ /** Enum value running. */
+ RUNNING("running"),
+
+ /** Enum value completed. */
+ COMPLETED("completed"),
+
+ /** Enum value failed. */
+ FAILED("failed"),
+
+ /** Enum value cancelled. */
+ CANCELLED("cancelled");
+
+ /** The actual serialized value for a JobStatus instance. */
+ private String value;
+
+ JobStatus(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a JobStatus instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed JobStatus object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static JobStatus fromString(String value) {
+ JobStatus[] items = JobStatus.values();
+ for (JobStatus item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobType.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobType.java
new file mode 100644
index 0000000000000..a3d8245197492
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/JobType.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for JobType.
+ */
+public final class JobType extends ExpandableStringEnum {
+ /** Static value unknown for JobType. */
+ public static final JobType UNKNOWN = fromString("unknown");
+
+ /** Static value export for JobType. */
+ public static final JobType EXPORT = fromString("export");
+
+ /** Static value import for JobType. */
+ public static final JobType IMPORT = fromString("import");
+
+ /** Static value backup for JobType. */
+ public static final JobType BACKUP = fromString("backup");
+
+ /** Static value readDeviceProperties for JobType. */
+ public static final JobType READ_DEVICE_PROPERTIES = fromString("readDeviceProperties");
+
+ /** Static value writeDeviceProperties for JobType. */
+ public static final JobType WRITE_DEVICE_PROPERTIES = fromString("writeDeviceProperties");
+
+ /** Static value updateDeviceConfiguration for JobType. */
+ public static final JobType UPDATE_DEVICE_CONFIGURATION = fromString("updateDeviceConfiguration");
+
+ /** Static value rebootDevice for JobType. */
+ public static final JobType REBOOT_DEVICE = fromString("rebootDevice");
+
+ /** Static value factoryResetDevice for JobType. */
+ public static final JobType FACTORY_RESET_DEVICE = fromString("factoryResetDevice");
+
+ /** Static value firmwareUpdate for JobType. */
+ public static final JobType FIRMWARE_UPDATE = fromString("firmwareUpdate");
+
+ /**
+ * Creates or finds a JobType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding JobType
+ */
+ @JsonCreator
+ public static JobType fromString(String name) {
+ return fromString(name, JobType.class);
+ }
+
+ /**
+ * @return known JobType values
+ */
+ public static Collection values() {
+ return values(JobType.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/MatchedRoute.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/MatchedRoute.java
new file mode 100644
index 0000000000000..3af929be07499
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/MatchedRoute.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Routes that matched.
+ */
+public class MatchedRoute {
+ /**
+ * Properties of routes that matched.
+ */
+ @JsonProperty(value = "properties")
+ private RouteProperties properties;
+
+ /**
+ * Get properties of routes that matched.
+ *
+ * @return the properties value
+ */
+ public RouteProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set properties of routes that matched.
+ *
+ * @param properties the properties value to set
+ * @return the MatchedRoute object itself.
+ */
+ public MatchedRoute withProperties(RouteProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/MessagingEndpointProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/MessagingEndpointProperties.java
new file mode 100644
index 0000000000000..c12863c550880
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/MessagingEndpointProperties.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import org.joda.time.Period;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the messaging endpoints used by this IoT hub.
+ */
+public class MessagingEndpointProperties {
+ /**
+ * The lock duration. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ */
+ @JsonProperty(value = "lockDurationAsIso8601")
+ private Period lockDurationAsIso8601;
+
+ /**
+ * The period of time for which a message is available to consume before it
+ * is expired by the IoT hub. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ */
+ @JsonProperty(value = "ttlAsIso8601")
+ private Period ttlAsIso8601;
+
+ /**
+ * The number of times the IoT hub attempts to deliver a message. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ */
+ @JsonProperty(value = "maxDeliveryCount")
+ private Integer maxDeliveryCount;
+
+ /**
+ * Get the lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ *
+ * @return the lockDurationAsIso8601 value
+ */
+ public Period lockDurationAsIso8601() {
+ return this.lockDurationAsIso8601;
+ }
+
+ /**
+ * Set the lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ *
+ * @param lockDurationAsIso8601 the lockDurationAsIso8601 value to set
+ * @return the MessagingEndpointProperties object itself.
+ */
+ public MessagingEndpointProperties withLockDurationAsIso8601(Period lockDurationAsIso8601) {
+ this.lockDurationAsIso8601 = lockDurationAsIso8601;
+ return this;
+ }
+
+ /**
+ * Get the period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ *
+ * @return the ttlAsIso8601 value
+ */
+ public Period ttlAsIso8601() {
+ return this.ttlAsIso8601;
+ }
+
+ /**
+ * Set the period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ *
+ * @param ttlAsIso8601 the ttlAsIso8601 value to set
+ * @return the MessagingEndpointProperties object itself.
+ */
+ public MessagingEndpointProperties withTtlAsIso8601(Period ttlAsIso8601) {
+ this.ttlAsIso8601 = ttlAsIso8601;
+ return this;
+ }
+
+ /**
+ * Get the number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ *
+ * @return the maxDeliveryCount value
+ */
+ public Integer maxDeliveryCount() {
+ return this.maxDeliveryCount;
+ }
+
+ /**
+ * Set the number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
+ *
+ * @param maxDeliveryCount the maxDeliveryCount value to set
+ * @return the MessagingEndpointProperties object itself.
+ */
+ public MessagingEndpointProperties withMaxDeliveryCount(Integer maxDeliveryCount) {
+ this.maxDeliveryCount = maxDeliveryCount;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Name.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Name.java
new file mode 100644
index 0000000000000..54e23da87413a
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Name.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Name of Iot Hub type.
+ */
+public class Name {
+ /**
+ * IotHub type.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /**
+ * Localized value of name.
+ */
+ @JsonProperty(value = "localizedValue")
+ private String localizedValue;
+
+ /**
+ * Get iotHub type.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set iotHub type.
+ *
+ * @param value the value value to set
+ * @return the Name object itself.
+ */
+ public Name withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get localized value of name.
+ *
+ * @return the localizedValue value
+ */
+ public String localizedValue() {
+ return this.localizedValue;
+ }
+
+ /**
+ * Set localized value of name.
+ *
+ * @param localizedValue the localizedValue value to set
+ * @return the Name object itself.
+ */
+ public Name withLocalizedValue(String localizedValue) {
+ this.localizedValue = localizedValue;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Operation.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Operation.java
new file mode 100644
index 0000000000000..385c4b15ac0b9
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Operation.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/OperationDisplay.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/OperationDisplay.java
new file mode 100644
index 0000000000000..3b57fb86752f8
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/OperationDisplay.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft Devices.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * Resource Type: IotHubs.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * Name of the operation.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * Description of the operation.
+ */
+ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY)
+ private String description;
+
+ /**
+ * Get service provider: Microsoft Devices.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get resource Type: IotHubs.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get name of the operation.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Get description of the operation.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/OperationInputs.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/OperationInputs.java
new file mode 100644
index 0000000000000..a28c0245910cc
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/OperationInputs.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Input values.
+ */
+public class OperationInputs {
+ /**
+ * The name of the IoT hub to check.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * Get the name of the IoT hub to check.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the IoT hub to check.
+ *
+ * @param name the name value to set
+ * @return the OperationInputs object itself.
+ */
+ public OperationInputs withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Operations.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Operations.java
new file mode 100644
index 0000000000000..d56e538d536a7
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available IoT Hub REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpoint.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpoint.java
new file mode 100644
index 0000000000000..8e55f1f954b95
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpoint.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The private endpoint property of a private endpoint connection.
+ */
+public class PrivateEndpoint {
+ /**
+ * The resource identifier.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * Get the resource identifier.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnection.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnection.java
new file mode 100644
index 0000000000000..6dd878b2b6736
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnection.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.PrivateEndpointConnectionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+
+/**
+ * Type representing PrivateEndpointConnection.
+ */
+public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ PrivateEndpointConnectionProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithProperties {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the privateendpointconnection update allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties the properties parameter value
+ * @return the next update stage
+ */
+ Update withProperties(PrivateEndpointConnectionProperties properties);
+ }
+
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnectionProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnectionProperties.java
new file mode 100644
index 0000000000000..a882ea8624bb5
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of a private endpoint connection.
+ */
+public class PrivateEndpointConnectionProperties {
+ /**
+ * The privateEndpoint property.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /**
+ * The privateLinkServiceConnectionState property.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /**
+ * Get the privateEndpoint value.
+ *
+ * @return the privateEndpoint value
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint value.
+ *
+ * @param privateEndpoint the privateEndpoint value to set
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState value.
+ *
+ * @return the privateLinkServiceConnectionState value
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState value.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnections.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnections.java
new file mode 100644
index 0000000000000..7670edfd658f7
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateEndpointConnections.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.PrivateEndpointConnectionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateEndpointConnections.
+ */
+public interface PrivateEndpointConnections extends HasInner {
+ /**
+ * Get private endpoint connection.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * List private endpoint connections.
+ * 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
+ * @return the observable for the request
+ */
+ Observable listAsync(String resourceGroupName, String resourceName);
+
+ /**
+ * Delete private endpoint connection.
+ * 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
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkResource.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkResource.java
new file mode 100644
index 0000000000000..be89e51086b9f
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkResource.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.PrivateLinkResourceInner;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.GroupIdInformationInner;
+import java.util.List;
+
+/**
+ * Type representing PrivateLinkResource.
+ */
+public interface PrivateLinkResource extends HasInner, HasManager {
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkResources.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkResources.java
new file mode 100644
index 0000000000000..fd4cf045c7d5a
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkResources.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.PrivateLinkResourcesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateLinkResources.
+ */
+public interface PrivateLinkResources extends HasInner {
+ /**
+ * List private link resources.
+ * 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
+ * @return the observable for the request
+ */
+ Observable listAsync(String resourceGroupName, String resourceName);
+
+ /**
+ * Get the specified private link resource.
+ * 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
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String resourceName, String groupId);
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkServiceConnectionState.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkServiceConnectionState.java
new file mode 100644
index 0000000000000..2e547aa99211b
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkServiceConnectionState.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The current state of a private endpoint connection.
+ */
+public class PrivateLinkServiceConnectionState {
+ /**
+ * The status of a private endpoint connection. Possible values include:
+ * 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ */
+ @JsonProperty(value = "status", required = true)
+ private PrivateLinkServiceConnectionStatus status;
+
+ /**
+ * The description for the current state of a private endpoint connection.
+ */
+ @JsonProperty(value = "description", required = true)
+ private String description;
+
+ /**
+ * Actions required for a private endpoint connection.
+ */
+ @JsonProperty(value = "actionsRequired")
+ private String actionsRequired;
+
+ /**
+ * Get the status of a private endpoint connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @return the status value
+ */
+ public PrivateLinkServiceConnectionStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status of a private endpoint connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @param status the status value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withStatus(PrivateLinkServiceConnectionStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the description for the current state of a private endpoint connection.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description for the current state of a private endpoint connection.
+ *
+ * @param description the description value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get actions required for a private endpoint connection.
+ *
+ * @return the actionsRequired value
+ */
+ public String actionsRequired() {
+ return this.actionsRequired;
+ }
+
+ /**
+ * Set actions required for a private endpoint connection.
+ *
+ * @param actionsRequired the actionsRequired value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) {
+ this.actionsRequired = actionsRequired;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkServiceConnectionStatus.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkServiceConnectionStatus.java
new file mode 100644
index 0000000000000..7c919c261dc31
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PrivateLinkServiceConnectionStatus.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PrivateLinkServiceConnectionStatus.
+ */
+public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEnum {
+ /** Static value Pending for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus PENDING = fromString("Pending");
+
+ /** Static value Approved for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus APPROVED = fromString("Approved");
+
+ /** Static value Rejected for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus REJECTED = fromString("Rejected");
+
+ /** Static value Disconnected for PrivateLinkServiceConnectionStatus. */
+ public static final PrivateLinkServiceConnectionStatus DISCONNECTED = fromString("Disconnected");
+
+ /**
+ * Creates or finds a PrivateLinkServiceConnectionStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PrivateLinkServiceConnectionStatus
+ */
+ @JsonCreator
+ public static PrivateLinkServiceConnectionStatus fromString(String name) {
+ return fromString(name, PrivateLinkServiceConnectionStatus.class);
+ }
+
+ /**
+ * @return known PrivateLinkServiceConnectionStatus values
+ */
+ public static Collection values() {
+ return values(PrivateLinkServiceConnectionStatus.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PublicNetworkAccess.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PublicNetworkAccess.java
new file mode 100644
index 0000000000000..a406ee1e0862b
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/PublicNetworkAccess.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PublicNetworkAccess.
+ */
+public final class PublicNetworkAccess extends ExpandableStringEnum {
+ /** Static value Enabled for PublicNetworkAccess. */
+ public static final PublicNetworkAccess ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for PublicNetworkAccess. */
+ public static final PublicNetworkAccess DISABLED = fromString("Disabled");
+
+ /**
+ * Creates or finds a PublicNetworkAccess from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PublicNetworkAccess
+ */
+ @JsonCreator
+ public static PublicNetworkAccess fromString(String name) {
+ return fromString(name, PublicNetworkAccess.class);
+ }
+
+ /**
+ * @return known PublicNetworkAccess values
+ */
+ public static Collection values() {
+ return values(PublicNetworkAccess.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RegistryStatistics.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RegistryStatistics.java
new file mode 100644
index 0000000000000..0d5cc3c09634a
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RegistryStatistics.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.RegistryStatisticsInner;
+
+/**
+ * Type representing RegistryStatistics.
+ */
+public interface RegistryStatistics extends HasInner, HasManager {
+ /**
+ * @return the disabledDeviceCount value.
+ */
+ Long disabledDeviceCount();
+
+ /**
+ * @return the enabledDeviceCount value.
+ */
+ Long enabledDeviceCount();
+
+ /**
+ * @return the totalDeviceCount value.
+ */
+ Long totalDeviceCount();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ResourceProviderCommons.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ResourceProviderCommons.java
new file mode 100644
index 0000000000000..3d342c5723e61
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/ResourceProviderCommons.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.ResourceProviderCommonsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ResourceProviderCommons.
+ */
+public interface ResourceProviderCommons extends HasInner {
+ /**
+ * Get the number of iot hubs in the subscription.
+ * Get the number of free and paid iot hubs in the subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteCompilationError.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteCompilationError.java
new file mode 100644
index 0000000000000..2521c0e6f9873
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteCompilationError.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Compilation error when evaluating route.
+ */
+public class RouteCompilationError {
+ /**
+ * Route error message.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Severity of the route error. Possible values include: 'error',
+ * 'warning'.
+ */
+ @JsonProperty(value = "severity")
+ private RouteErrorSeverity severity;
+
+ /**
+ * Location where the route error happened.
+ */
+ @JsonProperty(value = "location")
+ private RouteErrorRange location;
+
+ /**
+ * Get route error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set route error message.
+ *
+ * @param message the message value to set
+ * @return the RouteCompilationError object itself.
+ */
+ public RouteCompilationError withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get severity of the route error. Possible values include: 'error', 'warning'.
+ *
+ * @return the severity value
+ */
+ public RouteErrorSeverity severity() {
+ return this.severity;
+ }
+
+ /**
+ * Set severity of the route error. Possible values include: 'error', 'warning'.
+ *
+ * @param severity the severity value to set
+ * @return the RouteCompilationError object itself.
+ */
+ public RouteCompilationError withSeverity(RouteErrorSeverity severity) {
+ this.severity = severity;
+ return this;
+ }
+
+ /**
+ * Get location where the route error happened.
+ *
+ * @return the location value
+ */
+ public RouteErrorRange location() {
+ return this.location;
+ }
+
+ /**
+ * Set location where the route error happened.
+ *
+ * @param location the location value to set
+ * @return the RouteCompilationError object itself.
+ */
+ public RouteCompilationError withLocation(RouteErrorRange location) {
+ this.location = location;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorPosition.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorPosition.java
new file mode 100644
index 0000000000000..8ee72c5f3943b
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorPosition.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Position where the route error happened.
+ */
+public class RouteErrorPosition {
+ /**
+ * Line where the route error happened.
+ */
+ @JsonProperty(value = "line")
+ private Integer line;
+
+ /**
+ * Column where the route error happened.
+ */
+ @JsonProperty(value = "column")
+ private Integer column;
+
+ /**
+ * Get line where the route error happened.
+ *
+ * @return the line value
+ */
+ public Integer line() {
+ return this.line;
+ }
+
+ /**
+ * Set line where the route error happened.
+ *
+ * @param line the line value to set
+ * @return the RouteErrorPosition object itself.
+ */
+ public RouteErrorPosition withLine(Integer line) {
+ this.line = line;
+ return this;
+ }
+
+ /**
+ * Get column where the route error happened.
+ *
+ * @return the column value
+ */
+ public Integer column() {
+ return this.column;
+ }
+
+ /**
+ * Set column where the route error happened.
+ *
+ * @param column the column value to set
+ * @return the RouteErrorPosition object itself.
+ */
+ public RouteErrorPosition withColumn(Integer column) {
+ this.column = column;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorRange.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorRange.java
new file mode 100644
index 0000000000000..706d2e04e17b3
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorRange.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Range of route errors.
+ */
+public class RouteErrorRange {
+ /**
+ * Start where the route error happened.
+ */
+ @JsonProperty(value = "start")
+ private RouteErrorPosition start;
+
+ /**
+ * End where the route error happened.
+ */
+ @JsonProperty(value = "end")
+ private RouteErrorPosition end;
+
+ /**
+ * Get start where the route error happened.
+ *
+ * @return the start value
+ */
+ public RouteErrorPosition start() {
+ return this.start;
+ }
+
+ /**
+ * Set start where the route error happened.
+ *
+ * @param start the start value to set
+ * @return the RouteErrorRange object itself.
+ */
+ public RouteErrorRange withStart(RouteErrorPosition start) {
+ this.start = start;
+ return this;
+ }
+
+ /**
+ * Get end where the route error happened.
+ *
+ * @return the end value
+ */
+ public RouteErrorPosition end() {
+ return this.end;
+ }
+
+ /**
+ * Set end where the route error happened.
+ *
+ * @param end the end value to set
+ * @return the RouteErrorRange object itself.
+ */
+ public RouteErrorRange withEnd(RouteErrorPosition end) {
+ this.end = end;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorSeverity.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorSeverity.java
new file mode 100644
index 0000000000000..b2ea801ce879a
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteErrorSeverity.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for RouteErrorSeverity.
+ */
+public final class RouteErrorSeverity extends ExpandableStringEnum {
+ /** Static value error for RouteErrorSeverity. */
+ public static final RouteErrorSeverity ERROR = fromString("error");
+
+ /** Static value warning for RouteErrorSeverity. */
+ public static final RouteErrorSeverity WARNING = fromString("warning");
+
+ /**
+ * Creates or finds a RouteErrorSeverity from its string representation.
+ * @param name a name to look for
+ * @return the corresponding RouteErrorSeverity
+ */
+ @JsonCreator
+ public static RouteErrorSeverity fromString(String name) {
+ return fromString(name, RouteErrorSeverity.class);
+ }
+
+ /**
+ * @return known RouteErrorSeverity values
+ */
+ public static Collection values() {
+ return values(RouteErrorSeverity.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteProperties.java
new file mode 100644
index 0000000000000..d63aabb14706f
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RouteProperties.java
@@ -0,0 +1,157 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of a routing rule that your IoT hub uses to route messages to
+ * endpoints.
+ */
+public class RouteProperties {
+ /**
+ * The name of the route. The name can only include alphanumeric
+ * characters, periods, underscores, hyphens, has a maximum length of 64
+ * characters, and must be unique.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The source that the routing rule is to be applied to, such as
+ * DeviceMessages. Possible values include: 'Invalid', 'DeviceMessages',
+ * 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'.
+ */
+ @JsonProperty(value = "source", required = true)
+ private RoutingSource source;
+
+ /**
+ * The condition that is evaluated to apply the routing rule. If no
+ * condition is provided, it evaluates to true by default. For grammar,
+ * see:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
+ */
+ @JsonProperty(value = "condition")
+ private String condition;
+
+ /**
+ * The list of endpoints to which messages that satisfy the condition are
+ * routed. Currently only one endpoint is allowed.
+ */
+ @JsonProperty(value = "endpointNames", required = true)
+ private List endpointNames;
+
+ /**
+ * Used to specify whether a route is enabled.
+ */
+ @JsonProperty(value = "isEnabled", required = true)
+ private boolean isEnabled;
+
+ /**
+ * Get the name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
+ *
+ * @param name the name value to set
+ * @return the RouteProperties object itself.
+ */
+ public RouteProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'.
+ *
+ * @return the source value
+ */
+ public RoutingSource source() {
+ return this.source;
+ }
+
+ /**
+ * Set the source that the routing rule is to be applied to, such as DeviceMessages. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'.
+ *
+ * @param source the source value to set
+ * @return the RouteProperties object itself.
+ */
+ public RouteProperties withSource(RoutingSource source) {
+ this.source = source;
+ return this;
+ }
+
+ /**
+ * Get the condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
+ *
+ * @return the condition value
+ */
+ public String condition() {
+ return this.condition;
+ }
+
+ /**
+ * Set the condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language.
+ *
+ * @param condition the condition value to set
+ * @return the RouteProperties object itself.
+ */
+ public RouteProperties withCondition(String condition) {
+ this.condition = condition;
+ return this;
+ }
+
+ /**
+ * Get the list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
+ *
+ * @return the endpointNames value
+ */
+ public List endpointNames() {
+ return this.endpointNames;
+ }
+
+ /**
+ * Set the list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
+ *
+ * @param endpointNames the endpointNames value to set
+ * @return the RouteProperties object itself.
+ */
+ public RouteProperties withEndpointNames(List endpointNames) {
+ this.endpointNames = endpointNames;
+ return this;
+ }
+
+ /**
+ * Get used to specify whether a route is enabled.
+ *
+ * @return the isEnabled value
+ */
+ public boolean isEnabled() {
+ return this.isEnabled;
+ }
+
+ /**
+ * Set used to specify whether a route is enabled.
+ *
+ * @param isEnabled the isEnabled value to set
+ * @return the RouteProperties object itself.
+ */
+ public RouteProperties withIsEnabled(boolean isEnabled) {
+ this.isEnabled = isEnabled;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingEndpoints.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingEndpoints.java
new file mode 100644
index 0000000000000..d985a7cd1c5a0
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingEndpoints.java
@@ -0,0 +1,130 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties related to the custom endpoints to which your IoT hub routes
+ * messages based on the routing rules. A maximum of 10 custom endpoints are
+ * allowed across all endpoint types for paid hubs and only 1 custom endpoint
+ * is allowed across all endpoint types for free hubs.
+ */
+public class RoutingEndpoints {
+ /**
+ * The list of Service Bus queue endpoints that IoT hub routes the messages
+ * to, based on the routing rules.
+ */
+ @JsonProperty(value = "serviceBusQueues")
+ private List serviceBusQueues;
+
+ /**
+ * The list of Service Bus topic endpoints that the IoT hub routes the
+ * messages to, based on the routing rules.
+ */
+ @JsonProperty(value = "serviceBusTopics")
+ private List serviceBusTopics;
+
+ /**
+ * The list of Event Hubs endpoints that IoT hub routes messages to, based
+ * on the routing rules. This list does not include the built-in Event Hubs
+ * endpoint.
+ */
+ @JsonProperty(value = "eventHubs")
+ private List eventHubs;
+
+ /**
+ * The list of storage container endpoints that IoT hub routes messages to,
+ * based on the routing rules.
+ */
+ @JsonProperty(value = "storageContainers")
+ private List storageContainers;
+
+ /**
+ * Get the list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules.
+ *
+ * @return the serviceBusQueues value
+ */
+ public List serviceBusQueues() {
+ return this.serviceBusQueues;
+ }
+
+ /**
+ * Set the list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules.
+ *
+ * @param serviceBusQueues the serviceBusQueues value to set
+ * @return the RoutingEndpoints object itself.
+ */
+ public RoutingEndpoints withServiceBusQueues(List serviceBusQueues) {
+ this.serviceBusQueues = serviceBusQueues;
+ return this;
+ }
+
+ /**
+ * Get the list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules.
+ *
+ * @return the serviceBusTopics value
+ */
+ public List serviceBusTopics() {
+ return this.serviceBusTopics;
+ }
+
+ /**
+ * Set the list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules.
+ *
+ * @param serviceBusTopics the serviceBusTopics value to set
+ * @return the RoutingEndpoints object itself.
+ */
+ public RoutingEndpoints withServiceBusTopics(List serviceBusTopics) {
+ this.serviceBusTopics = serviceBusTopics;
+ return this;
+ }
+
+ /**
+ * Get the list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint.
+ *
+ * @return the eventHubs value
+ */
+ public List eventHubs() {
+ return this.eventHubs;
+ }
+
+ /**
+ * Set the list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint.
+ *
+ * @param eventHubs the eventHubs value to set
+ * @return the RoutingEndpoints object itself.
+ */
+ public RoutingEndpoints withEventHubs(List eventHubs) {
+ this.eventHubs = eventHubs;
+ return this;
+ }
+
+ /**
+ * Get the list of storage container endpoints that IoT hub routes messages to, based on the routing rules.
+ *
+ * @return the storageContainers value
+ */
+ public List storageContainers() {
+ return this.storageContainers;
+ }
+
+ /**
+ * Set the list of storage container endpoints that IoT hub routes messages to, based on the routing rules.
+ *
+ * @param storageContainers the storageContainers value to set
+ * @return the RoutingEndpoints object itself.
+ */
+ public RoutingEndpoints withStorageContainers(List storageContainers) {
+ this.storageContainers = storageContainers;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingEventHubProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingEventHubProperties.java
new file mode 100644
index 0000000000000..1fd3eb2380587
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingEventHubProperties.java
@@ -0,0 +1,230 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties related to an event hub endpoint.
+ */
+public class RoutingEventHubProperties {
+ /**
+ * Id of the event hub endpoint.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The connection string of the event hub endpoint.
+ */
+ @JsonProperty(value = "connectionString")
+ private String connectionString;
+
+ /**
+ * The url of the event hub endpoint. It must include the protocol sb://.
+ */
+ @JsonProperty(value = "endpointUri")
+ private String endpointUri;
+
+ /**
+ * Event hub name on the event hub namespace.
+ */
+ @JsonProperty(value = "entityPath")
+ private String entityPath;
+
+ /**
+ * Method used to authenticate against the event hub endpoint. Possible
+ * values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * The name that identifies this endpoint. The name can only include
+ * alphanumeric characters, periods, underscores, hyphens and has a maximum
+ * length of 64 characters. The following names are reserved: events,
+ * fileNotifications, $default. Endpoint names must be unique across
+ * endpoint types.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The subscription identifier of the event hub endpoint.
+ */
+ @JsonProperty(value = "subscriptionId")
+ private String subscriptionId;
+
+ /**
+ * The name of the resource group of the event hub endpoint.
+ */
+ @JsonProperty(value = "resourceGroup")
+ private String resourceGroup;
+
+ /**
+ * Get id of the event hub endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set id of the event hub endpoint.
+ *
+ * @param id the id value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the connection string of the event hub endpoint.
+ *
+ * @return the connectionString value
+ */
+ public String connectionString() {
+ return this.connectionString;
+ }
+
+ /**
+ * Set the connection string of the event hub endpoint.
+ *
+ * @param connectionString the connectionString value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withConnectionString(String connectionString) {
+ this.connectionString = connectionString;
+ return this;
+ }
+
+ /**
+ * Get the url of the event hub endpoint. It must include the protocol sb://.
+ *
+ * @return the endpointUri value
+ */
+ public String endpointUri() {
+ return this.endpointUri;
+ }
+
+ /**
+ * Set the url of the event hub endpoint. It must include the protocol sb://.
+ *
+ * @param endpointUri the endpointUri value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ return this;
+ }
+
+ /**
+ * Get event hub name on the event hub namespace.
+ *
+ * @return the entityPath value
+ */
+ public String entityPath() {
+ return this.entityPath;
+ }
+
+ /**
+ * Set event hub name on the event hub namespace.
+ *
+ * @param entityPath the entityPath value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withEntityPath(String entityPath) {
+ this.entityPath = entityPath;
+ return this;
+ }
+
+ /**
+ * Get method used to authenticate against the event hub endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set method used to authenticate against the event hub endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+ /**
+ * Get the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types.
+ *
+ * @param name the name value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the subscription identifier of the event hub endpoint.
+ *
+ * @return the subscriptionId value
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set the subscription identifier of the event hub endpoint.
+ *
+ * @param subscriptionId the subscriptionId value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the name of the resource group of the event hub endpoint.
+ *
+ * @return the resourceGroup value
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Set the name of the resource group of the event hub endpoint.
+ *
+ * @param resourceGroup the resourceGroup value to set
+ * @return the RoutingEventHubProperties object itself.
+ */
+ public RoutingEventHubProperties withResourceGroup(String resourceGroup) {
+ this.resourceGroup = resourceGroup;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingMessage.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingMessage.java
new file mode 100644
index 0000000000000..68368b488e6a9
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingMessage.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Routing message.
+ */
+public class RoutingMessage {
+ /**
+ * Body of routing message.
+ */
+ @JsonProperty(value = "body")
+ private String body;
+
+ /**
+ * App properties.
+ */
+ @JsonProperty(value = "appProperties")
+ private Map appProperties;
+
+ /**
+ * System properties.
+ */
+ @JsonProperty(value = "systemProperties")
+ private Map systemProperties;
+
+ /**
+ * Get body of routing message.
+ *
+ * @return the body value
+ */
+ public String body() {
+ return this.body;
+ }
+
+ /**
+ * Set body of routing message.
+ *
+ * @param body the body value to set
+ * @return the RoutingMessage object itself.
+ */
+ public RoutingMessage withBody(String body) {
+ this.body = body;
+ return this;
+ }
+
+ /**
+ * Get app properties.
+ *
+ * @return the appProperties value
+ */
+ public Map appProperties() {
+ return this.appProperties;
+ }
+
+ /**
+ * Set app properties.
+ *
+ * @param appProperties the appProperties value to set
+ * @return the RoutingMessage object itself.
+ */
+ public RoutingMessage withAppProperties(Map appProperties) {
+ this.appProperties = appProperties;
+ return this;
+ }
+
+ /**
+ * Get system properties.
+ *
+ * @return the systemProperties value
+ */
+ public Map systemProperties() {
+ return this.systemProperties;
+ }
+
+ /**
+ * Set system properties.
+ *
+ * @param systemProperties the systemProperties value to set
+ * @return the RoutingMessage object itself.
+ */
+ public RoutingMessage withSystemProperties(Map systemProperties) {
+ this.systemProperties = systemProperties;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingProperties.java
new file mode 100644
index 0000000000000..92c6d7d32bd72
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingProperties.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The routing related properties of the IoT hub. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging.
+ */
+public class RoutingProperties {
+ /**
+ * The endpoints property.
+ */
+ @JsonProperty(value = "endpoints")
+ private RoutingEndpoints endpoints;
+
+ /**
+ * The list of user-provided routing rules that the IoT hub uses to route
+ * messages to built-in and custom endpoints. A maximum of 100 routing
+ * rules are allowed for paid hubs and a maximum of 5 routing rules are
+ * allowed for free hubs.
+ */
+ @JsonProperty(value = "routes")
+ private List routes;
+
+ /**
+ * The properties of the route that is used as a fall-back route when none
+ * of the conditions specified in the 'routes' section are met. This is an
+ * optional parameter. When this property is not set, the messages which do
+ * not meet any of the conditions specified in the 'routes' section get
+ * routed to the built-in eventhub endpoint.
+ */
+ @JsonProperty(value = "fallbackRoute")
+ private FallbackRouteProperties fallbackRoute;
+
+ /**
+ * The list of user-provided enrichments that the IoT hub applies to
+ * messages to be delivered to built-in and custom endpoints. See:
+ * https://aka.ms/telemetryoneventgrid.
+ */
+ @JsonProperty(value = "enrichments")
+ private List enrichments;
+
+ /**
+ * Get the endpoints value.
+ *
+ * @return the endpoints value
+ */
+ public RoutingEndpoints endpoints() {
+ return this.endpoints;
+ }
+
+ /**
+ * Set the endpoints value.
+ *
+ * @param endpoints the endpoints value to set
+ * @return the RoutingProperties object itself.
+ */
+ public RoutingProperties withEndpoints(RoutingEndpoints endpoints) {
+ this.endpoints = endpoints;
+ return this;
+ }
+
+ /**
+ * Get the list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
+ *
+ * @return the routes value
+ */
+ public List routes() {
+ return this.routes;
+ }
+
+ /**
+ * Set the list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
+ *
+ * @param routes the routes value to set
+ * @return the RoutingProperties object itself.
+ */
+ public RoutingProperties withRoutes(List routes) {
+ this.routes = routes;
+ return this;
+ }
+
+ /**
+ * Get the properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
+ *
+ * @return the fallbackRoute value
+ */
+ public FallbackRouteProperties fallbackRoute() {
+ return this.fallbackRoute;
+ }
+
+ /**
+ * Set the properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
+ *
+ * @param fallbackRoute the fallbackRoute value to set
+ * @return the RoutingProperties object itself.
+ */
+ public RoutingProperties withFallbackRoute(FallbackRouteProperties fallbackRoute) {
+ this.fallbackRoute = fallbackRoute;
+ return this;
+ }
+
+ /**
+ * Get the list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid.
+ *
+ * @return the enrichments value
+ */
+ public List enrichments() {
+ return this.enrichments;
+ }
+
+ /**
+ * Set the list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid.
+ *
+ * @param enrichments the enrichments value to set
+ * @return the RoutingProperties object itself.
+ */
+ public RoutingProperties withEnrichments(List enrichments) {
+ this.enrichments = enrichments;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingServiceBusQueueEndpointProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingServiceBusQueueEndpointProperties.java
new file mode 100644
index 0000000000000..378c79877e2a9
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingServiceBusQueueEndpointProperties.java
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties related to service bus queue endpoint types.
+ */
+public class RoutingServiceBusQueueEndpointProperties {
+ /**
+ * Id of the service bus queue endpoint.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The connection string of the service bus queue endpoint.
+ */
+ @JsonProperty(value = "connectionString")
+ private String connectionString;
+
+ /**
+ * The url of the service bus queue endpoint. It must include the protocol
+ * sb://.
+ */
+ @JsonProperty(value = "endpointUri")
+ private String endpointUri;
+
+ /**
+ * Queue name on the service bus namespace.
+ */
+ @JsonProperty(value = "entityPath")
+ private String entityPath;
+
+ /**
+ * Method used to authenticate against the service bus queue endpoint.
+ * Possible values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * The name that identifies this endpoint. The name can only include
+ * alphanumeric characters, periods, underscores, hyphens and has a maximum
+ * length of 64 characters. The following names are reserved: events,
+ * fileNotifications, $default. Endpoint names must be unique across
+ * endpoint types. The name need not be the same as the actual queue name.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The subscription identifier of the service bus queue endpoint.
+ */
+ @JsonProperty(value = "subscriptionId")
+ private String subscriptionId;
+
+ /**
+ * The name of the resource group of the service bus queue endpoint.
+ */
+ @JsonProperty(value = "resourceGroup")
+ private String resourceGroup;
+
+ /**
+ * Get id of the service bus queue endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set id of the service bus queue endpoint.
+ *
+ * @param id the id value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the connection string of the service bus queue endpoint.
+ *
+ * @return the connectionString value
+ */
+ public String connectionString() {
+ return this.connectionString;
+ }
+
+ /**
+ * Set the connection string of the service bus queue endpoint.
+ *
+ * @param connectionString the connectionString value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withConnectionString(String connectionString) {
+ this.connectionString = connectionString;
+ return this;
+ }
+
+ /**
+ * Get the url of the service bus queue endpoint. It must include the protocol sb://.
+ *
+ * @return the endpointUri value
+ */
+ public String endpointUri() {
+ return this.endpointUri;
+ }
+
+ /**
+ * Set the url of the service bus queue endpoint. It must include the protocol sb://.
+ *
+ * @param endpointUri the endpointUri value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ return this;
+ }
+
+ /**
+ * Get queue name on the service bus namespace.
+ *
+ * @return the entityPath value
+ */
+ public String entityPath() {
+ return this.entityPath;
+ }
+
+ /**
+ * Set queue name on the service bus namespace.
+ *
+ * @param entityPath the entityPath value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withEntityPath(String entityPath) {
+ this.entityPath = entityPath;
+ return this;
+ }
+
+ /**
+ * Get method used to authenticate against the service bus queue endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set method used to authenticate against the service bus queue endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+ /**
+ * Get the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual queue name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual queue name.
+ *
+ * @param name the name value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the subscription identifier of the service bus queue endpoint.
+ *
+ * @return the subscriptionId value
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set the subscription identifier of the service bus queue endpoint.
+ *
+ * @param subscriptionId the subscriptionId value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the name of the resource group of the service bus queue endpoint.
+ *
+ * @return the resourceGroup value
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Set the name of the resource group of the service bus queue endpoint.
+ *
+ * @param resourceGroup the resourceGroup value to set
+ * @return the RoutingServiceBusQueueEndpointProperties object itself.
+ */
+ public RoutingServiceBusQueueEndpointProperties withResourceGroup(String resourceGroup) {
+ this.resourceGroup = resourceGroup;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingServiceBusTopicEndpointProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingServiceBusTopicEndpointProperties.java
new file mode 100644
index 0000000000000..c78d633009554
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingServiceBusTopicEndpointProperties.java
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties related to service bus topic endpoint types.
+ */
+public class RoutingServiceBusTopicEndpointProperties {
+ /**
+ * Id of the service bus topic endpoint.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The connection string of the service bus topic endpoint.
+ */
+ @JsonProperty(value = "connectionString")
+ private String connectionString;
+
+ /**
+ * The url of the service bus topic endpoint. It must include the protocol
+ * sb://.
+ */
+ @JsonProperty(value = "endpointUri")
+ private String endpointUri;
+
+ /**
+ * Queue name on the service bus topic.
+ */
+ @JsonProperty(value = "entityPath")
+ private String entityPath;
+
+ /**
+ * Method used to authenticate against the service bus topic endpoint.
+ * Possible values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * The name that identifies this endpoint. The name can only include
+ * alphanumeric characters, periods, underscores, hyphens and has a maximum
+ * length of 64 characters. The following names are reserved: events,
+ * fileNotifications, $default. Endpoint names must be unique across
+ * endpoint types. The name need not be the same as the actual topic name.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The subscription identifier of the service bus topic endpoint.
+ */
+ @JsonProperty(value = "subscriptionId")
+ private String subscriptionId;
+
+ /**
+ * The name of the resource group of the service bus topic endpoint.
+ */
+ @JsonProperty(value = "resourceGroup")
+ private String resourceGroup;
+
+ /**
+ * Get id of the service bus topic endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set id of the service bus topic endpoint.
+ *
+ * @param id the id value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the connection string of the service bus topic endpoint.
+ *
+ * @return the connectionString value
+ */
+ public String connectionString() {
+ return this.connectionString;
+ }
+
+ /**
+ * Set the connection string of the service bus topic endpoint.
+ *
+ * @param connectionString the connectionString value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withConnectionString(String connectionString) {
+ this.connectionString = connectionString;
+ return this;
+ }
+
+ /**
+ * Get the url of the service bus topic endpoint. It must include the protocol sb://.
+ *
+ * @return the endpointUri value
+ */
+ public String endpointUri() {
+ return this.endpointUri;
+ }
+
+ /**
+ * Set the url of the service bus topic endpoint. It must include the protocol sb://.
+ *
+ * @param endpointUri the endpointUri value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ return this;
+ }
+
+ /**
+ * Get queue name on the service bus topic.
+ *
+ * @return the entityPath value
+ */
+ public String entityPath() {
+ return this.entityPath;
+ }
+
+ /**
+ * Set queue name on the service bus topic.
+ *
+ * @param entityPath the entityPath value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withEntityPath(String entityPath) {
+ this.entityPath = entityPath;
+ return this;
+ }
+
+ /**
+ * Get method used to authenticate against the service bus topic endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set method used to authenticate against the service bus topic endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+ /**
+ * Get the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual topic name.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual topic name.
+ *
+ * @param name the name value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the subscription identifier of the service bus topic endpoint.
+ *
+ * @return the subscriptionId value
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set the subscription identifier of the service bus topic endpoint.
+ *
+ * @param subscriptionId the subscriptionId value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the name of the resource group of the service bus topic endpoint.
+ *
+ * @return the resourceGroup value
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Set the name of the resource group of the service bus topic endpoint.
+ *
+ * @param resourceGroup the resourceGroup value to set
+ * @return the RoutingServiceBusTopicEndpointProperties object itself.
+ */
+ public RoutingServiceBusTopicEndpointProperties withResourceGroup(String resourceGroup) {
+ this.resourceGroup = resourceGroup;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingSource.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingSource.java
new file mode 100644
index 0000000000000..36bf2ad069749
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingSource.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for RoutingSource.
+ */
+public final class RoutingSource extends ExpandableStringEnum {
+ /** Static value Invalid for RoutingSource. */
+ public static final RoutingSource INVALID = fromString("Invalid");
+
+ /** Static value DeviceMessages for RoutingSource. */
+ public static final RoutingSource DEVICE_MESSAGES = fromString("DeviceMessages");
+
+ /** Static value TwinChangeEvents for RoutingSource. */
+ public static final RoutingSource TWIN_CHANGE_EVENTS = fromString("TwinChangeEvents");
+
+ /** Static value DeviceLifecycleEvents for RoutingSource. */
+ public static final RoutingSource DEVICE_LIFECYCLE_EVENTS = fromString("DeviceLifecycleEvents");
+
+ /** Static value DeviceJobLifecycleEvents for RoutingSource. */
+ public static final RoutingSource DEVICE_JOB_LIFECYCLE_EVENTS = fromString("DeviceJobLifecycleEvents");
+
+ /**
+ * Creates or finds a RoutingSource from its string representation.
+ * @param name a name to look for
+ * @return the corresponding RoutingSource
+ */
+ @JsonCreator
+ public static RoutingSource fromString(String name) {
+ return fromString(name, RoutingSource.class);
+ }
+
+ /**
+ * @return known RoutingSource values
+ */
+ public static Collection values() {
+ return values(RoutingSource.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingStorageContainerProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingStorageContainerProperties.java
new file mode 100644
index 0000000000000..6055450f58996
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingStorageContainerProperties.java
@@ -0,0 +1,341 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties related to a storage container endpoint.
+ */
+public class RoutingStorageContainerProperties {
+ /**
+ * Id of the storage container endpoint.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * The connection string of the storage account.
+ */
+ @JsonProperty(value = "connectionString")
+ private String connectionString;
+
+ /**
+ * The url of the storage endpoint. It must include the protocol https://.
+ */
+ @JsonProperty(value = "endpointUri")
+ private String endpointUri;
+
+ /**
+ * Method used to authenticate against the storage endpoint. Possible
+ * values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * The name that identifies this endpoint. The name can only include
+ * alphanumeric characters, periods, underscores, hyphens and has a maximum
+ * length of 64 characters. The following names are reserved: events,
+ * fileNotifications, $default. Endpoint names must be unique across
+ * endpoint types.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The subscription identifier of the storage account.
+ */
+ @JsonProperty(value = "subscriptionId")
+ private String subscriptionId;
+
+ /**
+ * The name of the resource group of the storage account.
+ */
+ @JsonProperty(value = "resourceGroup")
+ private String resourceGroup;
+
+ /**
+ * The name of storage container in the storage account.
+ */
+ @JsonProperty(value = "containerName", required = true)
+ private String containerName;
+
+ /**
+ * File name format for the blob. Default format is
+ * {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are
+ * mandatory but can be reordered.
+ */
+ @JsonProperty(value = "fileNameFormat")
+ private String fileNameFormat;
+
+ /**
+ * Time interval at which blobs are written to storage. Value should be
+ * between 60 and 720 seconds. Default value is 300 seconds.
+ */
+ @JsonProperty(value = "batchFrequencyInSeconds")
+ private Integer batchFrequencyInSeconds;
+
+ /**
+ * Maximum number of bytes for each blob written to storage. Value should
+ * be between 10485760(10MB) and 524288000(500MB). Default value is
+ * 314572800(300MB).
+ */
+ @JsonProperty(value = "maxChunkSizeInBytes")
+ private Integer maxChunkSizeInBytes;
+
+ /**
+ * Encoding that is used to serialize messages to blobs. Supported values
+ * are 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. Possible
+ * values include: 'Avro', 'AvroDeflate', 'JSON'.
+ */
+ @JsonProperty(value = "encoding")
+ private String encoding;
+
+ /**
+ * Get id of the storage container endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set id of the storage container endpoint.
+ *
+ * @param id the id value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the connection string of the storage account.
+ *
+ * @return the connectionString value
+ */
+ public String connectionString() {
+ return this.connectionString;
+ }
+
+ /**
+ * Set the connection string of the storage account.
+ *
+ * @param connectionString the connectionString value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withConnectionString(String connectionString) {
+ this.connectionString = connectionString;
+ return this;
+ }
+
+ /**
+ * Get the url of the storage endpoint. It must include the protocol https://.
+ *
+ * @return the endpointUri value
+ */
+ public String endpointUri() {
+ return this.endpointUri;
+ }
+
+ /**
+ * Set the url of the storage endpoint. It must include the protocol https://.
+ *
+ * @param endpointUri the endpointUri value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withEndpointUri(String endpointUri) {
+ this.endpointUri = endpointUri;
+ return this;
+ }
+
+ /**
+ * Get method used to authenticate against the storage endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set method used to authenticate against the storage endpoint. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+ /**
+ * Get the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types.
+ *
+ * @param name the name value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the subscription identifier of the storage account.
+ *
+ * @return the subscriptionId value
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Set the subscription identifier of the storage account.
+ *
+ * @param subscriptionId the subscriptionId value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /**
+ * Get the name of the resource group of the storage account.
+ *
+ * @return the resourceGroup value
+ */
+ public String resourceGroup() {
+ return this.resourceGroup;
+ }
+
+ /**
+ * Set the name of the resource group of the storage account.
+ *
+ * @param resourceGroup the resourceGroup value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withResourceGroup(String resourceGroup) {
+ this.resourceGroup = resourceGroup;
+ return this;
+ }
+
+ /**
+ * Get the name of storage container in the storage account.
+ *
+ * @return the containerName value
+ */
+ public String containerName() {
+ return this.containerName;
+ }
+
+ /**
+ * Set the name of storage container in the storage account.
+ *
+ * @param containerName the containerName value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withContainerName(String containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ /**
+ * Get file name format for the blob. Default format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be reordered.
+ *
+ * @return the fileNameFormat value
+ */
+ public String fileNameFormat() {
+ return this.fileNameFormat;
+ }
+
+ /**
+ * Set file name format for the blob. Default format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be reordered.
+ *
+ * @param fileNameFormat the fileNameFormat value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withFileNameFormat(String fileNameFormat) {
+ this.fileNameFormat = fileNameFormat;
+ return this;
+ }
+
+ /**
+ * Get time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds.
+ *
+ * @return the batchFrequencyInSeconds value
+ */
+ public Integer batchFrequencyInSeconds() {
+ return this.batchFrequencyInSeconds;
+ }
+
+ /**
+ * Set time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds.
+ *
+ * @param batchFrequencyInSeconds the batchFrequencyInSeconds value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withBatchFrequencyInSeconds(Integer batchFrequencyInSeconds) {
+ this.batchFrequencyInSeconds = batchFrequencyInSeconds;
+ return this;
+ }
+
+ /**
+ * Get maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB).
+ *
+ * @return the maxChunkSizeInBytes value
+ */
+ public Integer maxChunkSizeInBytes() {
+ return this.maxChunkSizeInBytes;
+ }
+
+ /**
+ * Set maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB).
+ *
+ * @param maxChunkSizeInBytes the maxChunkSizeInBytes value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withMaxChunkSizeInBytes(Integer maxChunkSizeInBytes) {
+ this.maxChunkSizeInBytes = maxChunkSizeInBytes;
+ return this;
+ }
+
+ /**
+ * Get encoding that is used to serialize messages to blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON'.
+ *
+ * @return the encoding value
+ */
+ public String encoding() {
+ return this.encoding;
+ }
+
+ /**
+ * Set encoding that is used to serialize messages to blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON'.
+ *
+ * @param encoding the encoding value to set
+ * @return the RoutingStorageContainerProperties object itself.
+ */
+ public RoutingStorageContainerProperties withEncoding(String encoding) {
+ this.encoding = encoding;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingTwin.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingTwin.java
new file mode 100644
index 0000000000000..4f2bc2ddcd093
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingTwin.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Twin reference input parameter. This is an optional parameter.
+ */
+public class RoutingTwin {
+ /**
+ * Twin Tags.
+ */
+ @JsonProperty(value = "tags")
+ private Object tags;
+
+ /**
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private RoutingTwinProperties properties;
+
+ /**
+ * Get twin Tags.
+ *
+ * @return the tags value
+ */
+ public Object tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set twin Tags.
+ *
+ * @param tags the tags value to set
+ * @return the RoutingTwin object itself.
+ */
+ public RoutingTwin withTags(Object tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the properties value.
+ *
+ * @return the properties value
+ */
+ public RoutingTwinProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties value.
+ *
+ * @param properties the properties value to set
+ * @return the RoutingTwin object itself.
+ */
+ public RoutingTwin withProperties(RoutingTwinProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingTwinProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingTwinProperties.java
new file mode 100644
index 0000000000000..368eeadac70c5
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/RoutingTwinProperties.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The RoutingTwinProperties model.
+ */
+public class RoutingTwinProperties {
+ /**
+ * Twin desired properties.
+ */
+ @JsonProperty(value = "desired")
+ private Object desired;
+
+ /**
+ * Twin desired properties.
+ */
+ @JsonProperty(value = "reported")
+ private Object reported;
+
+ /**
+ * Get twin desired properties.
+ *
+ * @return the desired value
+ */
+ public Object desired() {
+ return this.desired;
+ }
+
+ /**
+ * Set twin desired properties.
+ *
+ * @param desired the desired value to set
+ * @return the RoutingTwinProperties object itself.
+ */
+ public RoutingTwinProperties withDesired(Object desired) {
+ this.desired = desired;
+ return this;
+ }
+
+ /**
+ * Get twin desired properties.
+ *
+ * @return the reported value
+ */
+ public Object reported() {
+ return this.reported;
+ }
+
+ /**
+ * Set twin desired properties.
+ *
+ * @param reported the reported value to set
+ * @return the RoutingTwinProperties object itself.
+ */
+ public RoutingTwinProperties withReported(Object reported) {
+ this.reported = reported;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/SharedAccessSignatureAuthorizationRule.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/SharedAccessSignatureAuthorizationRule.java
new file mode 100644
index 0000000000000..a33985f05424e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/SharedAccessSignatureAuthorizationRule.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.SharedAccessSignatureAuthorizationRuleInner;
+
+/**
+ * Type representing SharedAccessSignatureAuthorizationRule.
+ */
+public interface SharedAccessSignatureAuthorizationRule extends HasInner, HasManager {
+ /**
+ * @return the keyName value.
+ */
+ String keyName();
+
+ /**
+ * @return the primaryKey value.
+ */
+ String primaryKey();
+
+ /**
+ * @return the rights value.
+ */
+ AccessRights rights();
+
+ /**
+ * @return the secondaryKey value.
+ */
+ String secondaryKey();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/StorageEndpointProperties.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/StorageEndpointProperties.java
new file mode 100644
index 0000000000000..274f8dad2f200
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/StorageEndpointProperties.java
@@ -0,0 +1,128 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import org.joda.time.Period;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The properties of the Azure Storage endpoint for file upload.
+ */
+public class StorageEndpointProperties {
+ /**
+ * The period of time for which the SAS URI generated by IoT Hub for file
+ * upload is valid. See:
+ * https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
+ */
+ @JsonProperty(value = "sasTtlAsIso8601")
+ private Period sasTtlAsIso8601;
+
+ /**
+ * The connection string for the Azure Storage account to which files are
+ * uploaded.
+ */
+ @JsonProperty(value = "connectionString", required = true)
+ private String connectionString;
+
+ /**
+ * The name of the root container where you upload files. The container
+ * need not exist but should be creatable using the connectionString
+ * specified.
+ */
+ @JsonProperty(value = "containerName", required = true)
+ private String containerName;
+
+ /**
+ * Specifies authentication type being used for connecting to the storage
+ * account. Possible values include: 'keyBased', 'identityBased'.
+ */
+ @JsonProperty(value = "authenticationType")
+ private AuthenticationType authenticationType;
+
+ /**
+ * Get the period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
+ *
+ * @return the sasTtlAsIso8601 value
+ */
+ public Period sasTtlAsIso8601() {
+ return this.sasTtlAsIso8601;
+ }
+
+ /**
+ * Set the period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
+ *
+ * @param sasTtlAsIso8601 the sasTtlAsIso8601 value to set
+ * @return the StorageEndpointProperties object itself.
+ */
+ public StorageEndpointProperties withSasTtlAsIso8601(Period sasTtlAsIso8601) {
+ this.sasTtlAsIso8601 = sasTtlAsIso8601;
+ return this;
+ }
+
+ /**
+ * Get the connection string for the Azure Storage account to which files are uploaded.
+ *
+ * @return the connectionString value
+ */
+ public String connectionString() {
+ return this.connectionString;
+ }
+
+ /**
+ * Set the connection string for the Azure Storage account to which files are uploaded.
+ *
+ * @param connectionString the connectionString value to set
+ * @return the StorageEndpointProperties object itself.
+ */
+ public StorageEndpointProperties withConnectionString(String connectionString) {
+ this.connectionString = connectionString;
+ return this;
+ }
+
+ /**
+ * Get the name of the root container where you upload files. The container need not exist but should be creatable using the connectionString specified.
+ *
+ * @return the containerName value
+ */
+ public String containerName() {
+ return this.containerName;
+ }
+
+ /**
+ * Set the name of the root container where you upload files. The container need not exist but should be creatable using the connectionString specified.
+ *
+ * @param containerName the containerName value to set
+ * @return the StorageEndpointProperties object itself.
+ */
+ public StorageEndpointProperties withContainerName(String containerName) {
+ this.containerName = containerName;
+ return this;
+ }
+
+ /**
+ * Get specifies authentication type being used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @return the authenticationType value
+ */
+ public AuthenticationType authenticationType() {
+ return this.authenticationType;
+ }
+
+ /**
+ * Set specifies authentication type being used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'.
+ *
+ * @param authenticationType the authenticationType value to set
+ * @return the StorageEndpointProperties object itself.
+ */
+ public StorageEndpointProperties withAuthenticationType(AuthenticationType authenticationType) {
+ this.authenticationType = authenticationType;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TagsResource.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TagsResource.java
new file mode 100644
index 0000000000000..551d58b99e7d1
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TagsResource.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A container holding only the Tags for a resource, allowing the user to
+ * update the tags on an IoT Hub instance.
+ */
+public class TagsResource {
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the TagsResource object itself.
+ */
+ public TagsResource withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestAllRoutesInput.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestAllRoutesInput.java
new file mode 100644
index 0000000000000..91cc1b9935e80
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestAllRoutesInput.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Input for testing all routes.
+ */
+public class TestAllRoutesInput {
+ /**
+ * Routing source. Possible values include: 'Invalid', 'DeviceMessages',
+ * 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'.
+ */
+ @JsonProperty(value = "routingSource")
+ private RoutingSource routingSource;
+
+ /**
+ * Routing message.
+ */
+ @JsonProperty(value = "message")
+ private RoutingMessage message;
+
+ /**
+ * Routing Twin Reference.
+ */
+ @JsonProperty(value = "twin")
+ private RoutingTwin twin;
+
+ /**
+ * Get routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'.
+ *
+ * @return the routingSource value
+ */
+ public RoutingSource routingSource() {
+ return this.routingSource;
+ }
+
+ /**
+ * Set routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents'.
+ *
+ * @param routingSource the routingSource value to set
+ * @return the TestAllRoutesInput object itself.
+ */
+ public TestAllRoutesInput withRoutingSource(RoutingSource routingSource) {
+ this.routingSource = routingSource;
+ return this;
+ }
+
+ /**
+ * Get routing message.
+ *
+ * @return the message value
+ */
+ public RoutingMessage message() {
+ return this.message;
+ }
+
+ /**
+ * Set routing message.
+ *
+ * @param message the message value to set
+ * @return the TestAllRoutesInput object itself.
+ */
+ public TestAllRoutesInput withMessage(RoutingMessage message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get routing Twin Reference.
+ *
+ * @return the twin value
+ */
+ public RoutingTwin twin() {
+ return this.twin;
+ }
+
+ /**
+ * Set routing Twin Reference.
+ *
+ * @param twin the twin value to set
+ * @return the TestAllRoutesInput object itself.
+ */
+ public TestAllRoutesInput withTwin(RoutingTwin twin) {
+ this.twin = twin;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestAllRoutesResult.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestAllRoutesResult.java
new file mode 100644
index 0000000000000..b455d15b652f8
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestAllRoutesResult.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.TestAllRoutesResultInner;
+import java.util.List;
+
+/**
+ * Type representing TestAllRoutesResult.
+ */
+public interface TestAllRoutesResult extends HasInner, HasManager {
+ /**
+ * @return the routes value.
+ */
+ List routes();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestResultStatus.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestResultStatus.java
new file mode 100644
index 0000000000000..9c941784d837e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestResultStatus.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for TestResultStatus.
+ */
+public final class TestResultStatus extends ExpandableStringEnum {
+ /** Static value undefined for TestResultStatus. */
+ public static final TestResultStatus UNDEFINED = fromString("undefined");
+
+ /** Static value false for TestResultStatus. */
+ public static final TestResultStatus FALSE = fromString("false");
+
+ /** Static value true for TestResultStatus. */
+ public static final TestResultStatus TRUE = fromString("true");
+
+ /**
+ * Creates or finds a TestResultStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding TestResultStatus
+ */
+ @JsonCreator
+ public static TestResultStatus fromString(String name) {
+ return fromString(name, TestResultStatus.class);
+ }
+
+ /**
+ * @return known TestResultStatus values
+ */
+ public static Collection values() {
+ return values(TestResultStatus.class);
+ }
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteInput.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteInput.java
new file mode 100644
index 0000000000000..335590c3291e5
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteInput.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Input for testing route.
+ */
+public class TestRouteInput {
+ /**
+ * Routing message.
+ */
+ @JsonProperty(value = "message")
+ private RoutingMessage message;
+
+ /**
+ * Route properties.
+ */
+ @JsonProperty(value = "route", required = true)
+ private RouteProperties route;
+
+ /**
+ * Routing Twin Reference.
+ */
+ @JsonProperty(value = "twin")
+ private RoutingTwin twin;
+
+ /**
+ * Get routing message.
+ *
+ * @return the message value
+ */
+ public RoutingMessage message() {
+ return this.message;
+ }
+
+ /**
+ * Set routing message.
+ *
+ * @param message the message value to set
+ * @return the TestRouteInput object itself.
+ */
+ public TestRouteInput withMessage(RoutingMessage message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get route properties.
+ *
+ * @return the route value
+ */
+ public RouteProperties route() {
+ return this.route;
+ }
+
+ /**
+ * Set route properties.
+ *
+ * @param route the route value to set
+ * @return the TestRouteInput object itself.
+ */
+ public TestRouteInput withRoute(RouteProperties route) {
+ this.route = route;
+ return this;
+ }
+
+ /**
+ * Get routing Twin Reference.
+ *
+ * @return the twin value
+ */
+ public RoutingTwin twin() {
+ return this.twin;
+ }
+
+ /**
+ * Set routing Twin Reference.
+ *
+ * @param twin the twin value to set
+ * @return the TestRouteInput object itself.
+ */
+ public TestRouteInput withTwin(RoutingTwin twin) {
+ this.twin = twin;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteResult.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteResult.java
new file mode 100644
index 0000000000000..4e52c2e46e4e4
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteResult.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.TestRouteResultInner;
+
+/**
+ * Type representing TestRouteResult.
+ */
+public interface TestRouteResult extends HasInner, HasManager {
+ /**
+ * @return the details value.
+ */
+ TestRouteResultDetails details();
+
+ /**
+ * @return the result value.
+ */
+ TestResultStatus result();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteResultDetails.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteResultDetails.java
new file mode 100644
index 0000000000000..0e4ad45ff33ca
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/TestRouteResultDetails.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Detailed result of testing a route.
+ */
+public class TestRouteResultDetails {
+ /**
+ * JSON-serialized list of route compilation errors.
+ */
+ @JsonProperty(value = "compilationErrors")
+ private List compilationErrors;
+
+ /**
+ * Get jSON-serialized list of route compilation errors.
+ *
+ * @return the compilationErrors value
+ */
+ public List compilationErrors() {
+ return this.compilationErrors;
+ }
+
+ /**
+ * Set jSON-serialized list of route compilation errors.
+ *
+ * @param compilationErrors the compilationErrors value to set
+ * @return the TestRouteResultDetails object itself.
+ */
+ public TestRouteResultDetails withCompilationErrors(List compilationErrors) {
+ this.compilationErrors = compilationErrors;
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/UserSubscriptionQuota.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/UserSubscriptionQuota.java
new file mode 100644
index 0000000000000..f476070a79e2b
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/UserSubscriptionQuota.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.DevicesManager;
+import com.microsoft.azure.management.iothub.v2020_03_01.implementation.UserSubscriptionQuotaInner;
+
+/**
+ * Type representing UserSubscriptionQuota.
+ */
+public interface UserSubscriptionQuota extends HasInner, HasManager {
+ /**
+ * @return the currentValue value.
+ */
+ Integer currentValue();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the limit value.
+ */
+ Integer limit();
+
+ /**
+ * @return the name value.
+ */
+ Name name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the unit value.
+ */
+ String unit();
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateDescriptionImpl.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateDescriptionImpl.java
new file mode 100644
index 0000000000000..7252c19dabb8c
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateDescriptionImpl.java
@@ -0,0 +1,129 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateDescription;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateProperties;
+
+class CertificateDescriptionImpl extends CreatableUpdatableImpl implements CertificateDescription, CertificateDescription.Definition, CertificateDescription.Update {
+ private final DevicesManager manager;
+ private String resourceGroupName;
+ private String resourceName;
+ private String certificateName;
+ private String cifMatch;
+ private String ccertificate;
+ private String uifMatch;
+ private String ucertificate;
+
+ CertificateDescriptionImpl(String name, DevicesManager manager) {
+ super(name, new CertificateDescriptionInner());
+ this.manager = manager;
+ // Set resource name
+ this.certificateName = name;
+ //
+ }
+
+ CertificateDescriptionImpl(CertificateDescriptionInner inner, DevicesManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.certificateName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.resourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "IotHubs");
+ this.certificateName = IdParsingUtils.getValueFromIdByName(inner.id(), "certificates");
+ //
+ }
+
+ @Override
+ public DevicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ CertificatesInner client = this.manager().inner().certificates();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.certificateName, this.cifMatch, this.ccertificate)
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ CertificatesInner client = this.manager().inner().certificates();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.resourceName, this.certificateName, this.uifMatch, this.ucertificate)
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ CertificatesInner client = this.manager().inner().certificates();
+ return client.getAsync(this.resourceGroupName, this.resourceName, this.certificateName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public String etag() {
+ return this.inner().etag();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public CertificateProperties properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public CertificateDescriptionImpl withExistingIotHub(String resourceGroupName, String resourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ @Override
+ public CertificateDescriptionImpl withIfMatch(String ifMatch) {
+ if (isInCreateMode()) {
+ this.cifMatch = ifMatch;
+ } else {
+ this.uifMatch = ifMatch;
+ }
+ return this;
+ }
+
+ @Override
+ public CertificateDescriptionImpl withCertificate(String certificate) {
+ if (isInCreateMode()) {
+ this.ccertificate = certificate;
+ } else {
+ this.ucertificate = certificate;
+ }
+ return this;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateDescriptionInner.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateDescriptionInner.java
new file mode 100644
index 0000000000000..439120d5e7abd
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateDescriptionInner.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The X509 Certificate.
+ */
+public class CertificateDescriptionInner extends ProxyResource {
+ /**
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private CertificateProperties properties;
+
+ /**
+ * The entity tag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get the properties value.
+ *
+ * @return the properties value
+ */
+ public CertificateProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties value.
+ *
+ * @param properties the properties value to set
+ * @return the CertificateDescriptionInner object itself.
+ */
+ public CertificateDescriptionInner withProperties(CertificateProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the entity tag.
+ *
+ * @return the etag value
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateListDescriptionImpl.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateListDescriptionImpl.java
new file mode 100644
index 0000000000000..e3ce29a9b973f
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateListDescriptionImpl.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateListDescription;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.List;
+
+class CertificateListDescriptionImpl extends WrapperImpl implements CertificateListDescription {
+ private final DevicesManager manager;
+ CertificateListDescriptionImpl(CertificateListDescriptionInner inner, DevicesManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public DevicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public List value() {
+ return this.inner().value();
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateListDescriptionInner.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateListDescriptionInner.java
new file mode 100644
index 0000000000000..5870b9da3f66e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateListDescriptionInner.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The JSON-serialized array of Certificate objects.
+ */
+public class CertificateListDescriptionInner {
+ /**
+ * The array of Certificate objects.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the array of Certificate objects.
+ *
+ * @return the value value
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set 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;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateWithNonceDescriptionImpl.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateWithNonceDescriptionImpl.java
new file mode 100644
index 0000000000000..c68183727e796
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateWithNonceDescriptionImpl.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateWithNonceDescription;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificatePropertiesWithNonce;
+
+class CertificateWithNonceDescriptionImpl extends WrapperImpl implements CertificateWithNonceDescription {
+ private final DevicesManager manager;
+ CertificateWithNonceDescriptionImpl(CertificateWithNonceDescriptionInner inner, DevicesManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public DevicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String etag() {
+ return this.inner().etag();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public CertificatePropertiesWithNonce properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateWithNonceDescriptionInner.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateWithNonceDescriptionInner.java
new file mode 100644
index 0000000000000..1e26a96b1bcf6
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificateWithNonceDescriptionInner.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificatePropertiesWithNonce;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The X509 Certificate.
+ */
+public class CertificateWithNonceDescriptionInner extends ProxyResource {
+ /**
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private CertificatePropertiesWithNonce properties;
+
+ /**
+ * The entity tag.
+ */
+ @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
+ private String etag;
+
+ /**
+ * Get the properties value.
+ *
+ * @return the properties value
+ */
+ public CertificatePropertiesWithNonce properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties value.
+ *
+ * @param properties the properties value to set
+ * @return the CertificateWithNonceDescriptionInner object itself.
+ */
+ public CertificateWithNonceDescriptionInner withProperties(CertificatePropertiesWithNonce properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the entity tag.
+ *
+ * @return the etag value
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificatesImpl.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificatesImpl.java
new file mode 100644
index 0000000000000..46476731a71a4
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificatesImpl.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.iothub.v2020_03_01.Certificates;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateListDescription;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateWithNonceDescription;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateDescription;
+
+class CertificatesImpl extends WrapperImpl implements Certificates {
+ private final DevicesManager manager;
+
+ CertificatesImpl(DevicesManager manager) {
+ super(manager.inner().certificates());
+ this.manager = manager;
+ }
+
+ public DevicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public CertificateDescriptionImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private CertificateDescriptionImpl wrapModel(CertificateDescriptionInner inner) {
+ return new CertificateDescriptionImpl(inner, manager());
+ }
+
+ private CertificateDescriptionImpl wrapModel(String name) {
+ return new CertificateDescriptionImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listByIotHubAsync(String resourceGroupName, String resourceName) {
+ CertificatesInner client = this.inner();
+ return client.listByIotHubAsync(resourceGroupName, resourceName)
+ .map(new Func1() {
+ @Override
+ public CertificateListDescription call(CertificateListDescriptionInner inner) {
+ return new CertificateListDescriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable generateVerificationCodeAsync(String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ CertificatesInner client = this.inner();
+ return client.generateVerificationCodeAsync(resourceGroupName, resourceName, certificateName, ifMatch)
+ .map(new Func1() {
+ @Override
+ public CertificateWithNonceDescription call(CertificateWithNonceDescriptionInner inner) {
+ return new CertificateWithNonceDescriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable verifyAsync(String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ CertificatesInner client = this.inner();
+ return client.verifyAsync(resourceGroupName, resourceName, certificateName, ifMatch)
+ .map(new Func1() {
+ @Override
+ public CertificateDescription call(CertificateDescriptionInner inner) {
+ return new CertificateDescriptionImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String resourceName, String certificateName) {
+ CertificatesInner client = this.inner();
+ return client.getAsync(resourceGroupName, resourceName, certificateName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(CertificateDescriptionInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((CertificateDescription)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
+ CertificatesInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, resourceName, certificateName, ifMatch).toCompletable();
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificatesInner.java b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificatesInner.java
new file mode 100644
index 0000000000000..53390a69695bc
--- /dev/null
+++ b/sdk/iothub/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/iothub/v2020_03_01/implementation/CertificatesInner.java
@@ -0,0 +1,893 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.iothub.v2020_03_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateBodyDescription;
+import com.microsoft.azure.management.iothub.v2020_03_01.CertificateVerificationDescription;
+import com.microsoft.azure.management.iothub.v2020_03_01.ErrorDetailsInnerException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Certificates.
+ */
+public class CertificatesInner {
+ /** The Retrofit service to perform REST calls. */
+ private CertificatesService service;
+ /** The service client containing this operation class. */
+ private IotHubClientImpl client;
+
+ /**
+ * Initializes an instance of CertificatesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public CertificatesInner(Retrofit retrofit, IotHubClientImpl client) {
+ this.service = retrofit.create(CertificatesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Certificates to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface CertificatesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iothub.v2020_03_01.Certificates listByIotHub" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates")
+ Observable> listByIotHub(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iothub.v2020_03_01.Certificates get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}")
+ Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iothub.v2020_03_01.Certificates createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}")
+ Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Body CertificateBodyDescription certificateDescription, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iothub.v2020_03_01.Certificates delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iothub.v2020_03_01.Certificates generateVerificationCode" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode")
+ Observable> generateVerificationCode(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.iothub.v2020_03_01.Certificates verify" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/verify")
+ Observable> verify(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("resourceName") String resourceName, @Path("certificateName") String certificateName, @Query("api-version") String apiVersion, @Header("If-Match") String ifMatch, @Header("accept-language") String acceptLanguage, @Body CertificateVerificationDescription certificateVerificationBody, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Get the certificate list.
+ * 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 ErrorDetailsInnerException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CertificateListDescriptionInner object if successful.
+ */
+ public CertificateListDescriptionInner listByIotHub(String resourceGroupName, String resourceName) {
+ return listByIotHubWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body();
+ }
+
+ /**
+ * Get the certificate list.
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture listByIotHubAsync(String resourceGroupName, String resourceName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(listByIotHubWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback);
+ }
+
+ /**
+ * Get the certificate list.
+ * 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
+ * @return the observable to the CertificateListDescriptionInner object
+ */
+ public Observable listByIotHubAsync(String resourceGroupName, String resourceName) {
+ return listByIotHubWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1, CertificateListDescriptionInner>() {
+ @Override
+ public CertificateListDescriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get the certificate list.
+ * 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
+ * @return the observable to the CertificateListDescriptionInner object
+ */
+ public Observable> listByIotHubWithServiceResponseAsync(String resourceGroupName, String resourceName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.listByIotHub(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = listByIotHubDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse listByIotHubDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorDetailsInnerException.class)
+ .build(response);
+ }
+
+ /**
+ * Get the certificate.
+ * 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 ErrorDetailsInnerException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CertificateDescriptionInner object if successful.
+ */
+ public CertificateDescriptionInner get(String resourceGroupName, String resourceName, String certificateName) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceName, certificateName).toBlocking().single().body();
+ }
+
+ /**
+ * Get the certificate.
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String resourceName, String certificateName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, resourceName, certificateName), serviceCallback);
+ }
+
+ /**
+ * Get the certificate.
+ * 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
+ * @return the observable to the CertificateDescriptionInner object
+ */
+ public Observable getAsync(String resourceGroupName, String resourceName, String certificateName) {
+ return getWithServiceResponseAsync(resourceGroupName, resourceName, certificateName).map(new Func1, CertificateDescriptionInner>() {
+ @Override
+ public CertificateDescriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Get the certificate.
+ * 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
+ * @return the observable to the CertificateDescriptionInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String resourceName, String certificateName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (certificateName == null) {
+ throw new IllegalArgumentException("Parameter certificateName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(this.client.subscriptionId(), resourceGroupName, resourceName, certificateName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorDetailsInnerException.class)
+ .build(response);
+ }
+
+ /**
+ * Upload the certificate to the IoT hub.
+ * 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
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorDetailsInnerException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CertificateDescriptionInner object if successful.
+ */
+ public CertificateDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, String certificateName) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, certificateName).toBlocking().single().body();
+ }
+
+ /**
+ * Upload the certificate to the IoT hub.
+ * 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String resourceName, String certificateName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, certificateName), serviceCallback);
+ }
+
+ /**
+ * Upload the certificate to the IoT hub.
+ * 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
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CertificateDescriptionInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String resourceName, String certificateName) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, certificateName).map(new Func1, CertificateDescriptionInner>() {
+ @Override
+ public CertificateDescriptionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Upload the certificate to the IoT hub.
+ * 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
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CertificateDescriptionInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String resourceName, String certificateName) {
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (resourceName == null) {
+ throw new IllegalArgumentException("Parameter resourceName is required and cannot be null.");
+ }
+ if (certificateName == null) {
+ throw new IllegalArgumentException("Parameter certificateName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String ifMatch = null;
+ final String certificate = null;
+ CertificateBodyDescription certificateDescription = new CertificateBodyDescription();
+ certificateDescription.withCertificate(null);
+ return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, resourceName, certificateName, this.client.apiVersion(), ifMatch, this.client.acceptLanguage(), certificateDescription, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Upload the certificate to the IoT hub.
+ * 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 ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate.
+ * @param certificate base-64 representation of the X509 leaf certificate .cer file or just .pem file content.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorDetailsInnerException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CertificateDescriptionInner object if successful.
+ */
+ public CertificateDescriptionInner createOrUpdate(String resourceGroupName, String resourceName, String certificateName, String ifMatch, String certificate) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, certificateName, ifMatch, certificate).toBlocking().single().body();
+ }
+
+ /**
+ * Upload the certificate to the IoT hub.
+ * 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 ifMatch ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate.
+ * @param certificate base-64 representation of the X509 leaf certificate .cer file or just .pem file content.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture