diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/pom.xml b/sdk/iothub/mgmt-v2019_03_22_preview/pom.xml
index 21d7065a92f4a..1dfa6d0ea16ce 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/pom.xml
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/pom.xml
@@ -11,10 +11,10 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
- azure-mgmt-iothub
+ azure-mgmt-devices
1.0.0-beta
jar
Microsoft Azure SDK for Devices Management
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateDescription.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateDescription.java
index c3df57eed24a0..781916c443e96 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateDescription.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateDescription.java
@@ -16,12 +16,12 @@
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.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
/**
* Type representing CertificateDescription.
*/
-public interface CertificateDescription extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface CertificateDescription extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the etag value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateListDescription.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateListDescription.java
index bbb2c02bf6126..c58f50d83856f 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateListDescription.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateListDescription.java
@@ -10,7 +10,7 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.CertificateListDescriptionInner;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.CertificateDescriptionInner;
import java.util.List;
@@ -18,7 +18,7 @@
/**
* Type representing CertificateListDescription.
*/
-public interface CertificateListDescription extends HasInner, HasManager {
+public interface CertificateListDescription extends HasInner, HasManager {
/**
* @return the value value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateWithNonceDescription.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateWithNonceDescription.java
index d65d138678a51..90416c4eb57fc 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateWithNonceDescription.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/CertificateWithNonceDescription.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.CertificateWithNonceDescriptionInner;
/**
* Type representing CertificateWithNonceDescription.
*/
-public interface CertificateWithNonceDescription extends HasInner, HasManager {
+public interface CertificateWithNonceDescription extends HasInner, HasManager {
/**
* @return the etag value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EndpointHealthData.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EndpointHealthData.java
index 3035c88a15a97..d04a3340f14d3 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EndpointHealthData.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EndpointHealthData.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.EndpointHealthDataInner;
/**
* Type representing EndpointHealthData.
*/
-public interface EndpointHealthData extends HasInner, HasManager {
+public interface EndpointHealthData extends HasInner, HasManager {
/**
* @return the endpointId value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EventHubConsumerGroupInfo.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EventHubConsumerGroupInfo.java
index 348d6ddf9d005..05e5e17379dd3 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EventHubConsumerGroupInfo.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/EventHubConsumerGroupInfo.java
@@ -16,13 +16,13 @@
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.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import java.util.Map;
/**
* Type representing EventHubConsumerGroupInfo.
*/
-public interface EventHubConsumerGroupInfo extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+public interface EventHubConsumerGroupInfo extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
* @return the etag value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubDescription.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubDescription.java
index dbfe87cca62d0..2e4ca8326c439 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubDescription.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubDescription.java
@@ -17,13 +17,13 @@
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.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IotHubDescriptionInner;
/**
* Type representing IotHubDescription.
*/
-public interface IotHubDescription extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+public interface IotHubDescription extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
/**
* @return the etag value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubLocationDescription.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubLocationDescription.java
new file mode 100644
index 0000000000000..e6fe8fc87679d
--- /dev/null
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubLocationDescription.java
@@ -0,0 +1,71 @@
+/**
+ * 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.v2019_03_22_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Public representation of one of the locations where a resource is
+ * provisioned.
+ */
+public class IotHubLocationDescription {
+ /**
+ * Azure Geo Regions.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Specific Role assigned to this location. Possible values include:
+ * 'primary', 'secondary'.
+ */
+ @JsonProperty(value = "role")
+ private IotHubReplicaRoleType role;
+
+ /**
+ * Get azure Geo Regions.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set azure Geo Regions.
+ *
+ * @param location the location value to set
+ * @return the IotHubLocationDescription object itself.
+ */
+ public IotHubLocationDescription withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get specific Role assigned to this location. Possible values include: 'primary', 'secondary'.
+ *
+ * @return the role value
+ */
+ public IotHubReplicaRoleType role() {
+ return this.role;
+ }
+
+ /**
+ * Set specific Role assigned to this location. 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-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubNameAvailabilityInfo.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubNameAvailabilityInfo.java
index 8ac139bdc2d53..f202cad0b414e 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubNameAvailabilityInfo.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubNameAvailabilityInfo.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IotHubNameAvailabilityInfoInner;
/**
* Type representing IotHubNameAvailabilityInfo.
*/
-public interface IotHubNameAvailabilityInfo extends HasInner, HasManager {
+public interface IotHubNameAvailabilityInfo extends HasInner, HasManager {
/**
* @return the message value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubProperties.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubProperties.java
index 848126ec57ded..3bd98b75abb35 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubProperties.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubProperties.java
@@ -111,6 +111,12 @@ public class IotHubProperties {
@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.
*
@@ -358,4 +364,13 @@ public IotHubProperties withFeatures(Capabilities 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-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubQuotaMetricInfo.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubQuotaMetricInfo.java
index 5eab7123ac4af..1e5c4ffd0d100 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubQuotaMetricInfo.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubQuotaMetricInfo.java
@@ -11,12 +11,12 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IotHubQuotaMetricInfoInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
/**
* Type representing IotHubQuotaMetricInfo.
*/
-public interface IotHubQuotaMetricInfo extends HasInner, HasManager {
+public interface IotHubQuotaMetricInfo extends HasInner, HasManager {
/**
* @return the currentValue value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubReplicaRoleType.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubReplicaRoleType.java
new file mode 100644
index 0000000000000..050bde90c42de
--- /dev/null
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/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.v2019_03_22_preview;
+
+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-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubSkuDescription.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubSkuDescription.java
index 71560787cd1c1..eb3e4401f99b5 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubSkuDescription.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/IotHubSkuDescription.java
@@ -11,12 +11,12 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IotHubSkuDescriptionInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
/**
* Type representing IotHubSkuDescription.
*/
-public interface IotHubSkuDescription extends HasInner, HasManager {
+public interface IotHubSkuDescription extends HasInner, HasManager {
/**
* @return the capacity value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/JobResponse.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/JobResponse.java
index da6ebbbc7b298..89a250b36add1 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/JobResponse.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/JobResponse.java
@@ -11,14 +11,14 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.JobResponseInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.rest.DateTimeRfc1123;
import org.joda.time.DateTime;
/**
* Type representing JobResponse.
*/
-public interface JobResponse extends HasInner, HasManager {
+public interface JobResponse extends HasInner, HasManager {
/**
* @return the endTimeUtc value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/Operation.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/Operation.java
index 4f4878ad97f34..661469ed190f1 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/Operation.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/Operation.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.OperationInner;
/**
* Type representing Operation.
*/
-public interface Operation extends HasInner, HasManager {
+public interface Operation extends HasInner, HasManager {
/**
* @return the display value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/RegistryStatistics.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/RegistryStatistics.java
index d8ec46aebbf44..01b4986127617 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/RegistryStatistics.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/RegistryStatistics.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.RegistryStatisticsInner;
/**
* Type representing RegistryStatistics.
*/
-public interface RegistryStatistics extends HasInner, HasManager {
+public interface RegistryStatistics extends HasInner, HasManager {
/**
* @return the disabledDeviceCount value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/SharedAccessSignatureAuthorizationRule.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/SharedAccessSignatureAuthorizationRule.java
index 004879b728f94..df5fefb2bc416 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/SharedAccessSignatureAuthorizationRule.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/SharedAccessSignatureAuthorizationRule.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.SharedAccessSignatureAuthorizationRuleInner;
/**
* Type representing SharedAccessSignatureAuthorizationRule.
*/
-public interface SharedAccessSignatureAuthorizationRule extends HasInner, HasManager {
+public interface SharedAccessSignatureAuthorizationRule extends HasInner, HasManager {
/**
* @return the keyName value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestAllRoutesResult.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestAllRoutesResult.java
index 7774c51e38f79..96a6dbb7e1054 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestAllRoutesResult.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestAllRoutesResult.java
@@ -10,14 +10,14 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.TestAllRoutesResultInner;
import java.util.List;
/**
* Type representing TestAllRoutesResult.
*/
-public interface TestAllRoutesResult extends HasInner, HasManager {
+public interface TestAllRoutesResult extends HasInner, HasManager {
/**
* @return the routes value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestRouteResult.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestRouteResult.java
index a6ce2324c2eba..434b82f510c91 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestRouteResult.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/TestRouteResult.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.TestRouteResultInner;
/**
* Type representing TestRouteResult.
*/
-public interface TestRouteResult extends HasInner, HasManager {
+public interface TestRouteResult extends HasInner, HasManager {
/**
* @return the details value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/UserSubscriptionQuota.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/UserSubscriptionQuota.java
index eea3d269d7c3e..8c5cca3772919 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/UserSubscriptionQuota.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/UserSubscriptionQuota.java
@@ -10,13 +10,13 @@
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.arm.resources.models.HasManager;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.IoTHubManager;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.DevicesManager;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.implementation.UserSubscriptionQuotaInner;
/**
* Type representing UserSubscriptionQuota.
*/
-public interface UserSubscriptionQuota extends HasInner, HasManager {
+public interface UserSubscriptionQuota extends HasInner, HasManager {
/**
* @return the currentValue value.
*/
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateDescriptionImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateDescriptionImpl.java
index fcfae23fc3917..1892d3ca19f3d 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateDescriptionImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateDescriptionImpl.java
@@ -14,7 +14,7 @@
import com.microsoft.azure.management.iothub.v2019_03_22_preview.CertificateProperties;
class CertificateDescriptionImpl extends CreatableUpdatableImpl implements CertificateDescription, CertificateDescription.Definition, CertificateDescription.Update {
- private final IoTHubManager manager;
+ private final DevicesManager manager;
private String resourceGroupName;
private String resourceName;
private String certificateName;
@@ -23,7 +23,7 @@ class CertificateDescriptionImpl extends CreatableUpdatableImpl implements CertificateListDescription {
- private final IoTHubManager manager;
- CertificateListDescriptionImpl(CertificateListDescriptionInner inner, IoTHubManager manager) {
+ private final DevicesManager manager;
+ CertificateListDescriptionImpl(CertificateListDescriptionInner inner, DevicesManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateWithNonceDescriptionImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateWithNonceDescriptionImpl.java
index f364309295281..083d1846b5410 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateWithNonceDescriptionImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificateWithNonceDescriptionImpl.java
@@ -13,14 +13,14 @@
import com.microsoft.azure.management.iothub.v2019_03_22_preview.CertificatePropertiesWithNonce;
class CertificateWithNonceDescriptionImpl extends WrapperImpl implements CertificateWithNonceDescription {
- private final IoTHubManager manager;
- CertificateWithNonceDescriptionImpl(CertificateWithNonceDescriptionInner inner, IoTHubManager manager) {
+ private final DevicesManager manager;
+ CertificateWithNonceDescriptionImpl(CertificateWithNonceDescriptionInner inner, DevicesManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesImpl.java
index 8251ee98994ec..3ce528c1c4990 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesImpl.java
@@ -19,14 +19,14 @@
import com.microsoft.azure.management.iothub.v2019_03_22_preview.CertificateDescription;
class CertificatesImpl extends WrapperImpl implements Certificates {
- private final IoTHubManager manager;
+ private final DevicesManager manager;
- CertificatesImpl(IoTHubManager manager) {
+ CertificatesImpl(DevicesManager manager) {
super(manager.inner().certificates());
this.manager = manager;
}
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
@@ -83,10 +83,14 @@ public CertificateDescription call(CertificateDescriptionInner inner) {
public Observable getAsync(String resourceGroupName, String resourceName, String certificateName) {
CertificatesInner client = this.inner();
return client.getAsync(resourceGroupName, resourceName, certificateName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public CertificateDescription call(CertificateDescriptionInner inner) {
- return wrapModel(inner);
+ public Observable call(CertificateDescriptionInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((CertificateDescription)wrapModel(inner));
+ }
}
});
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesInner.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesInner.java
index 59e8c29f72ed6..dace71e70a442 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesInner.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/CertificatesInner.java
@@ -12,7 +12,7 @@
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.CertificateBodyDescription;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.CertificateVerificationDescription;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.ErrorDetailsException;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.ErrorDetailsInnerException;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
@@ -90,7 +90,7 @@ interface CertificatesService {
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws 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.
*/
@@ -166,10 +166,10 @@ public Observable> call(Respons
});
}
- private ServiceResponse listByIotHubDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse listByIotHubDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -181,7 +181,7 @@ private ServiceResponse listByIotHubDelegate(Re
* @param resourceName The name of the IoT hub.
* @param certificateName The name of the certificate
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws 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.
*/
@@ -263,10 +263,10 @@ public Observable> call(Response getDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse getDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -278,7 +278,7 @@ private ServiceResponse getDelegate(Response> call(Response> call(Response createOrUpdateDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(201, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -481,7 +481,7 @@ private ServiceResponse createOrUpdateDelegate(Resp
* @param certificateName The name of the certificate
* @param ifMatch ETag of the Certificate.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws ErrorDetailsInnerException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
public void delete(String resourceGroupName, String resourceName, String certificateName, String ifMatch) {
@@ -568,11 +568,11 @@ public Observable> call(Response response) {
});
}
- private ServiceResponse deleteDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse deleteDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(204, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -585,7 +585,7 @@ private ServiceResponse deleteDelegate(Response response) th
* @param certificateName The name of the certificate
* @param ifMatch ETag of the Certificate.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws 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 CertificateWithNonceDescriptionInner object if successful.
*/
@@ -673,10 +673,10 @@ public Observable> call(Re
});
}
- private ServiceResponse generateVerificationCodeDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse generateVerificationCodeDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -689,7 +689,7 @@ private ServiceResponse generateVerificati
* @param certificateName The name of the certificate
* @param ifMatch ETag of the Certificate.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws 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.
*/
@@ -790,7 +790,7 @@ public Observable> call(Response> call(Response verifyDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse verifyDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/DevicesManager.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/DevicesManager.java
new file mode 100644
index 0000000000000..b09c3816bbb6d
--- /dev/null
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/DevicesManager.java
@@ -0,0 +1,147 @@
+/**
+ * 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.v2019_03_22_preview.implementation;
+
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.AzureResponseBuilder;
+import com.microsoft.azure.credentials.AzureTokenCredentials;
+import com.microsoft.azure.management.apigeneration.Beta;
+import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
+import com.microsoft.azure.arm.resources.AzureConfigurable;
+import com.microsoft.azure.serializer.AzureJacksonAdapter;
+import com.microsoft.rest.RestClient;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.Operations;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.IotHubResources;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.ResourceProviderCommons;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.Certificates;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.IotHubs;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure Devices resource management.
+ */
+public final class DevicesManager extends ManagerCore {
+ private Operations operations;
+ private IotHubResources iotHubResources;
+ private ResourceProviderCommons resourceProviderCommons;
+ private Certificates certificates;
+ private IotHubs iotHubs;
+ /**
+ * Get a Configurable instance that can be used to create DevicesManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new DevicesManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of DevicesManager that exposes Devices resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the DevicesManager
+ */
+ public static DevicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new DevicesManager(new RestClient.Builder()
+ .withBaseUrl(credentials.environment(), AzureEnvironment.Endpoint.RESOURCE_MANAGER)
+ .withCredentials(credentials)
+ .withSerializerAdapter(new AzureJacksonAdapter())
+ .withResponseBuilderFactory(new AzureResponseBuilder.Factory())
+ .build(), subscriptionId);
+ }
+ /**
+ * Creates an instance of DevicesManager that exposes Devices resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the DevicesManager
+ */
+ public static DevicesManager authenticate(RestClient restClient, String subscriptionId) {
+ return new DevicesManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of DevicesManager that exposes Devices management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing Devices management API entry points that work across subscriptions
+ */
+ DevicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId);
+ }
+
+ /**
+ * @return Entry point to manage Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(this);
+ }
+ return this.operations;
+ }
+
+ /**
+ * @return Entry point to manage IotHubResources.
+ */
+ public IotHubResources iotHubResources() {
+ if (this.iotHubResources == null) {
+ this.iotHubResources = new IotHubResourcesImpl(this);
+ }
+ return this.iotHubResources;
+ }
+
+ /**
+ * @return Entry point to manage ResourceProviderCommons.
+ */
+ public ResourceProviderCommons resourceProviderCommons() {
+ if (this.resourceProviderCommons == null) {
+ this.resourceProviderCommons = new ResourceProviderCommonsImpl(this);
+ }
+ return this.resourceProviderCommons;
+ }
+
+ /**
+ * @return Entry point to manage Certificates.
+ */
+ public Certificates certificates() {
+ if (this.certificates == null) {
+ this.certificates = new CertificatesImpl(this);
+ }
+ return this.certificates;
+ }
+
+ /**
+ * @return Entry point to manage IotHubs.
+ */
+ public IotHubs iotHubs() {
+ if (this.iotHubs == null) {
+ this.iotHubs = new IotHubsImpl(this);
+ }
+ return this.iotHubs;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public DevicesManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return DevicesManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private DevicesManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new IotHubClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EndpointHealthDataImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EndpointHealthDataImpl.java
index c5de3de84469a..750e208e9861d 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EndpointHealthDataImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EndpointHealthDataImpl.java
@@ -13,14 +13,14 @@
import com.microsoft.azure.management.iothub.v2019_03_22_preview.EndpointHealthStatus;
class EndpointHealthDataImpl extends WrapperImpl implements EndpointHealthData {
- private final IoTHubManager manager;
- EndpointHealthDataImpl(EndpointHealthDataInner inner, IoTHubManager manager) {
+ private final DevicesManager manager;
+ EndpointHealthDataImpl(EndpointHealthDataInner inner, DevicesManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/ErrorDetailsInner.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/ErrorDetailsInner.java
new file mode 100644
index 0000000000000..d7bc5d3a66c33
--- /dev/null
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/ErrorDetailsInner.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.v2019_03_22_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error details.
+ */
+public class ErrorDetailsInner {
+ /**
+ * The error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * The HTTP status code.
+ */
+ @JsonProperty(value = "httpStatusCode", access = JsonProperty.Access.WRITE_ONLY)
+ private String httpStatusCode;
+
+ /**
+ * The error message.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private String details;
+
+ /**
+ * Get the error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return the httpStatusCode value
+ */
+ public String httpStatusCode() {
+ return this.httpStatusCode;
+ }
+
+ /**
+ * Get the error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the error details.
+ *
+ * @return the details value
+ */
+ public String details() {
+ return this.details;
+ }
+
+}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/ErrorDetailsInnerException.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/ErrorDetailsInnerException.java
new file mode 100644
index 0000000000000..ec28fc399ea3e
--- /dev/null
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/ErrorDetailsInnerException.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.v2019_03_22_preview.implementation;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorDetailsInner information.
+ */
+public class ErrorDetailsInnerException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorDetailsInnerException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorDetailsInnerException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorDetailsInnerException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorDetailsInnerException(final String message, final Response response, final ErrorDetailsInner body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorDetailsInner body() {
+ return (ErrorDetailsInner) super.body();
+ }
+}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EventHubConsumerGroupInfoImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EventHubConsumerGroupInfoImpl.java
index fd0d5f1b04863..ad13df0cf2cd3 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EventHubConsumerGroupInfoImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/EventHubConsumerGroupInfoImpl.java
@@ -14,13 +14,13 @@
import java.util.Map;
class EventHubConsumerGroupInfoImpl extends CreatableUpdatableImpl implements EventHubConsumerGroupInfo, EventHubConsumerGroupInfo.Definition, EventHubConsumerGroupInfo.Update {
- private final IoTHubManager manager;
+ private final DevicesManager manager;
private String resourceGroupName;
private String resourceName;
private String eventHubEndpointName;
private String name;
- EventHubConsumerGroupInfoImpl(String name, IoTHubManager manager) {
+ EventHubConsumerGroupInfoImpl(String name, DevicesManager manager) {
super(name, new EventHubConsumerGroupInfoInner());
this.manager = manager;
// Set resource name
@@ -28,7 +28,7 @@ class EventHubConsumerGroupInfoImpl extends CreatableUpdatableImpl implements IotHubDescription, IotHubDescription.Definition, IotHubDescription.Update {
+class IotHubDescriptionImpl extends GroupableResourceCoreImpl implements IotHubDescription, IotHubDescription.Definition, IotHubDescription.Update {
private String cifMatch;
private String uifMatch;
- IotHubDescriptionImpl(String name, IotHubDescriptionInner inner, IoTHubManager manager) {
+ IotHubDescriptionImpl(String name, IotHubDescriptionInner inner, DevicesManager manager) {
super(name, inner, manager);
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubNameAvailabilityInfoImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubNameAvailabilityInfoImpl.java
index f4e0268da658b..01d497ed8add3 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubNameAvailabilityInfoImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubNameAvailabilityInfoImpl.java
@@ -13,14 +13,14 @@
import com.microsoft.azure.management.iothub.v2019_03_22_preview.IotHubNameUnavailabilityReason;
class IotHubNameAvailabilityInfoImpl extends WrapperImpl implements IotHubNameAvailabilityInfo {
- private final IoTHubManager manager;
- IotHubNameAvailabilityInfoImpl(IotHubNameAvailabilityInfoInner inner, IoTHubManager manager) {
+ private final DevicesManager manager;
+ IotHubNameAvailabilityInfoImpl(IotHubNameAvailabilityInfoInner inner, DevicesManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubQuotaMetricInfoImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubQuotaMetricInfoImpl.java
index ceb868091ca4b..1b8620e8199bd 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubQuotaMetricInfoImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubQuotaMetricInfoImpl.java
@@ -13,15 +13,15 @@
import rx.Observable;
class IotHubQuotaMetricInfoImpl extends WrapperImpl implements IotHubQuotaMetricInfo {
- private final IoTHubManager manager;
+ private final DevicesManager manager;
- IotHubQuotaMetricInfoImpl(IotHubQuotaMetricInfoInner inner, IoTHubManager manager) {
+ IotHubQuotaMetricInfoImpl(IotHubQuotaMetricInfoInner inner, DevicesManager manager) {
super(inner);
this.manager = manager;
}
@Override
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesImpl.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesImpl.java
index d9420ee006f81..e8a27534c8228 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesImpl.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesImpl.java
@@ -32,14 +32,14 @@
import com.microsoft.azure.management.iothub.v2019_03_22_preview.TestRouteInput;
class IotHubResourcesImpl extends WrapperImpl implements IotHubResources {
- private final IoTHubManager manager;
+ private final DevicesManager manager;
- IotHubResourcesImpl(IoTHubManager manager) {
+ IotHubResourcesImpl(DevicesManager manager) {
super(manager.inner().iotHubResources());
this.manager = manager;
}
- public IoTHubManager manager() {
+ public DevicesManager manager() {
return this.manager;
}
@@ -105,10 +105,14 @@ private Observable getJobResponseInnerUsingIotHubResourcesInne
@Override
public Observable getByResourceGroupAsync(String resourceGroupName, String name) {
- return this.getIotHubDescriptionInnerUsingIotHubResourcesInnerAsync(resourceGroupName, name).map(new Func1 () {
+ return this.getIotHubDescriptionInnerUsingIotHubResourcesInnerAsync(resourceGroupName, name).flatMap(new Func1> () {
@Override
- public IotHubDescription call(IotHubDescriptionInner inner) {
- return wrapIotHubDescriptionModel(inner);
+ public Observable call(IotHubDescriptionInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((IotHubDescription)wrapIotHubDescriptionModel(inner));
+ }
}
});
}
@@ -260,10 +264,14 @@ public IotHubSkuDescription call(IotHubSkuDescriptionInner inner) {
public Observable getEventHubConsumerGroupAsync(String resourceGroupName, String resourceName, String eventHubEndpointName, String name) {
IotHubResourcesInner client = this.inner();
return client.getEventHubConsumerGroupAsync(resourceGroupName, resourceName, eventHubEndpointName, name)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public EventHubConsumerGroupInfo call(EventHubConsumerGroupInfoInner inner) {
- return wrapEventHubConsumerGroupInfoModel(inner);
+ public Observable call(EventHubConsumerGroupInfoInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((EventHubConsumerGroupInfo)wrapEventHubConsumerGroupInfoModel(inner));
+ }
}
});
}
@@ -296,10 +304,14 @@ public Completable deleteEventHubConsumerGroupAsync(String resourceGroupName, St
public Observable getJobAsync(String resourceGroupName, String resourceName, String jobId) {
IotHubResourcesInner client = this.inner();
return client.getJobAsync(resourceGroupName, resourceName, jobId)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public JobResponse call(JobResponseInner inner) {
- return wrapJobResponseModel(inner);
+ public Observable call(JobResponseInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((JobResponse)wrapJobResponseModel(inner));
+ }
}
});
}
diff --git a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesInner.java b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesInner.java
index 3ed994c60bf79..94ae4862baca2 100644
--- a/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesInner.java
+++ b/sdk/iothub/mgmt-v2019_03_22_preview/src/main/java/com/microsoft/azure/management/iothub/v2019_03_22_preview/implementation/IotHubResourcesInner.java
@@ -16,8 +16,7 @@
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.ErrorDetails;
-import com.microsoft.azure.management.iothub.v2019_03_22_preview.ErrorDetailsException;
+import com.microsoft.azure.management.iothub.v2019_03_22_preview.ErrorDetailsInnerException;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.ExportDevicesRequest;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.ImportDevicesRequest;
import com.microsoft.azure.management.iothub.v2019_03_22_preview.OperationInputs;
@@ -220,7 +219,7 @@ interface IotHubResourcesService {
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws 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 IotHubDescriptionInner object if successful.
*/
@@ -296,10 +295,10 @@ public Observable> call(Response getByResourceGroupDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -311,7 +310,7 @@ private ServiceResponse getByResourceGroupDelegate(Respo
* @param resourceName The name of the IoT hub.
* @param iotHubDescription The IoT hub metadata and security metadata.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @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 IotHubDescriptionInner object if successful.
*/
@@ -393,7 +392,7 @@ public Observable> createOrUpdateWithSer
* @param iotHubDescription The IoT hub metadata and security metadata.
* @param ifMatch ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @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 IotHubDescriptionInner object if successful.
*/
@@ -477,7 +476,7 @@ public Observable> createOrUpdateWithSer
* @param resourceName The name of the IoT hub.
* @param iotHubDescription The IoT hub metadata and security metadata.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @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 IotHubDescriptionInner object if successful.
*/
@@ -570,7 +569,7 @@ public Observable> call(Response> call(Response beginCreateOrUpdateDelegate(Response response) throws ErrorDetailsException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorDetailsInnerException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(200, new TypeToken() { }.getType())
.register(201, new TypeToken() { }.getType())
- .registerError(ErrorDetailsException.class)
+ .registerError(ErrorDetailsInnerException.class)
.build(response);
}
@@ -1009,7 +1008,7 @@ private ServiceResponse beginUpdateDelegate(Response> deleteWithServiceResponseAsync(String
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ErrorDetailsException thrown if the request is rejected by server
+ * @throws 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 Object object if successful.
*/
@@ -1158,13 +1157,13 @@ public Observable> call(Response response)
});
}
- private ServiceResponse