diff --git a/eventhub/resource-manager/v2015_08_01/pom.xml b/eventhub/resource-manager/v2015_08_01/pom.xml
new file mode 100644
index 000000000000..cae83fe2c757
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.eventhub.v2015_08_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.2-beta
+ ../../../pom.xml
+
+ azure-mgmt-eventhub
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for EventHub Management
+ This package contains Microsoft EventHub Management SDK.
+ https://github.com/Azure/azure-libraries-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-libraries-for-java
+ scm:git:git@github.com:Azure/azure-libraries-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
+
+
+
+
+
+ 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
+ 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/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/AccessRights.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/AccessRights.java
new file mode 100644
index 000000000000..80c1fc5a5b71
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/AccessRights.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for AccessRights.
+ */
+public enum AccessRights {
+ /** Enum value Manage. */
+ MANAGE("Manage"),
+
+ /** Enum value Send. */
+ SEND("Send"),
+
+ /** Enum value Listen. */
+ LISTEN("Listen");
+
+ /** 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/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/CheckNameAvailabilityParameter.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/CheckNameAvailabilityParameter.java
new file mode 100644
index 000000000000..9b1db9b5a826
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/CheckNameAvailabilityParameter.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameter supplied to check Namespace name availability operation.
+ */
+public class CheckNameAvailabilityParameter {
+ /**
+ * Name to check the namespace name availability.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * Get name to check the namespace name availability.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name to check the namespace name availability.
+ *
+ * @param name the name value to set
+ * @return the CheckNameAvailabilityParameter object itself.
+ */
+ public CheckNameAvailabilityParameter withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/CheckNameAvailabilityResult.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/CheckNameAvailabilityResult.java
new file mode 100644
index 000000000000..6c63a7feb46f
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/CheckNameAvailabilityResult.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.EventHubManager;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.CheckNameAvailabilityResultInner;
+
+/**
+ * Type representing CheckNameAvailabilityResult.
+ */
+public interface CheckNameAvailabilityResult extends HasInner, HasManager {
+ /**
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * @return the nameAvailable value.
+ */
+ Boolean nameAvailable();
+
+ /**
+ * @return the reason value.
+ */
+ UnavailableReason reason();
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroupCreateOrUpdateParameters.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroupCreateOrUpdateParameters.java
new file mode 100644
index 000000000000..e28aa065da7a
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroupCreateOrUpdateParameters.java
@@ -0,0 +1,169 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Parameters supplied to the Create Or Update Consumer Group operation.
+ */
+@JsonFlatten
+public class ConsumerGroupCreateOrUpdateParameters {
+ /**
+ * Location of the resource.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /**
+ * ARM type of the Namespace.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Name of the consumer group.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Exact time the message was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdAt;
+
+ /**
+ * The path of the Event Hub.
+ */
+ @JsonProperty(value = "properties.eventHubPath", access = JsonProperty.Access.WRITE_ONLY)
+ private String eventHubPath;
+
+ /**
+ * The exact time the message was updated.
+ */
+ @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime updatedAt;
+
+ /**
+ * The user metadata.
+ */
+ @JsonProperty(value = "properties.userMetadata")
+ private String userMetadata;
+
+ /**
+ * Get location of the resource.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set location of the resource.
+ *
+ * @param location the location value to set
+ * @return the ConsumerGroupCreateOrUpdateParameters object itself.
+ */
+ public ConsumerGroupCreateOrUpdateParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get aRM type of the Namespace.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set aRM type of the Namespace.
+ *
+ * @param type the type value to set
+ * @return the ConsumerGroupCreateOrUpdateParameters object itself.
+ */
+ public ConsumerGroupCreateOrUpdateParameters withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get name of the consumer group.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of the consumer group.
+ *
+ * @param name the name value to set
+ * @return the ConsumerGroupCreateOrUpdateParameters object itself.
+ */
+ public ConsumerGroupCreateOrUpdateParameters withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get exact time the message was created.
+ *
+ * @return the createdAt value
+ */
+ public DateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the path of the Event Hub.
+ *
+ * @return the eventHubPath value
+ */
+ public String eventHubPath() {
+ return this.eventHubPath;
+ }
+
+ /**
+ * Get the exact time the message was updated.
+ *
+ * @return the updatedAt value
+ */
+ public DateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get the user metadata.
+ *
+ * @return the userMetadata value
+ */
+ public String userMetadata() {
+ return this.userMetadata;
+ }
+
+ /**
+ * Set the user metadata.
+ *
+ * @param userMetadata the userMetadata value to set
+ * @return the ConsumerGroupCreateOrUpdateParameters object itself.
+ */
+ public ConsumerGroupCreateOrUpdateParameters withUserMetadata(String userMetadata) {
+ this.userMetadata = userMetadata;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroupResource.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroupResource.java
new file mode 100644
index 000000000000..7bbe520b9175
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroupResource.java
@@ -0,0 +1,181 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.ConsumerGroupResourceInner;
+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.eventhub.v2015_08_01.implementation.EventHubManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing ConsumerGroupResource.
+ */
+public interface ConsumerGroupResource extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the eventHubPath value.
+ */
+ String eventHubPath();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * @return the userMetadata value.
+ */
+ String userMetadata();
+
+ /**
+ * The entirety of the ConsumerGroupResource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEventhub, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ConsumerGroupResource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ConsumerGroupResource definition.
+ */
+ interface Blank extends WithEventhub {
+ }
+
+ /**
+ * The stage of the consumergroupresource definition allowing to specify Eventhub.
+ */
+ interface WithEventhub {
+ /**
+ * Specifies resourceGroupName, namespaceName, eventHubName.
+ */
+ WithLocation withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName);
+ }
+
+ /**
+ * The stage of the consumergroupresource definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the consumergroupresource definition allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ WithCreate withName(String name);
+ }
+
+ /**
+ * The stage of the consumergroupresource definition allowing to specify Type.
+ */
+ interface WithType {
+ /**
+ * Specifies type.
+ */
+ WithCreate withType(String type);
+ }
+
+ /**
+ * The stage of the consumergroupresource definition allowing to specify UserMetadata.
+ */
+ interface WithUserMetadata {
+ /**
+ * Specifies userMetadata.
+ */
+ WithCreate withUserMetadata(String userMetadata);
+ }
+
+ /**
+ * 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, DefinitionStages.WithName, DefinitionStages.WithType, DefinitionStages.WithUserMetadata {
+ }
+ }
+ /**
+ * The template for a ConsumerGroupResource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithName, UpdateStages.WithType, UpdateStages.WithUserMetadata {
+ }
+
+ /**
+ * Grouping of ConsumerGroupResource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the consumergroupresource update allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ Update withName(String name);
+ }
+
+ /**
+ * The stage of the consumergroupresource update allowing to specify Type.
+ */
+ interface WithType {
+ /**
+ * Specifies type.
+ */
+ Update withType(String type);
+ }
+
+ /**
+ * The stage of the consumergroupresource update allowing to specify UserMetadata.
+ */
+ interface WithUserMetadata {
+ /**
+ * Specifies userMetadata.
+ */
+ Update withUserMetadata(String userMetadata);
+ }
+
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroups.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroups.java
new file mode 100644
index 000000000000..0c2c06ba4d98
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ConsumerGroups.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.ConsumerGroupsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ConsumerGroups.
+ */
+public interface ConsumerGroups extends SupportsCreating, HasInner {
+ /**
+ * Gets a description for the specified consumer group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName);
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAllAsync(final String resourceGroupName, final String namespaceName, final String eventHubName);
+
+ /**
+ * Deletes a consumer group from the specified Event Hub and resource group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName);
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EntityStatus.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EntityStatus.java
new file mode 100644
index 000000000000..e84cac69ccbc
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EntityStatus.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for EntityStatus.
+ */
+public enum EntityStatus {
+ /** Enum value Active. */
+ ACTIVE("Active"),
+
+ /** Enum value Disabled. */
+ DISABLED("Disabled"),
+
+ /** Enum value Restoring. */
+ RESTORING("Restoring"),
+
+ /** Enum value SendDisabled. */
+ SEND_DISABLED("SendDisabled"),
+
+ /** Enum value ReceiveDisabled. */
+ RECEIVE_DISABLED("ReceiveDisabled"),
+
+ /** Enum value Creating. */
+ CREATING("Creating"),
+
+ /** Enum value Deleting. */
+ DELETING("Deleting"),
+
+ /** Enum value Renaming. */
+ RENAMING("Renaming"),
+
+ /** Enum value Unknown. */
+ UNKNOWN("Unknown");
+
+ /** The actual serialized value for a EntityStatus instance. */
+ private String value;
+
+ EntityStatus(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a EntityStatus instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed EntityStatus object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static EntityStatus fromString(String value) {
+ EntityStatus[] items = EntityStatus.values();
+ for (EntityStatus item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubCreateOrUpdateParameters.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubCreateOrUpdateParameters.java
new file mode 100644
index 000000000000..59417ff7d142
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubCreateOrUpdateParameters.java
@@ -0,0 +1,224 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import org.joda.time.DateTime;
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Parameters supplied to the Create Or Update Event Hub operation.
+ */
+@JsonFlatten
+public class EventHubCreateOrUpdateParameters {
+ /**
+ * Location of the resource.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /**
+ * ARM type of the Namespace.
+ */
+ @JsonProperty(value = "type")
+ private String type;
+
+ /**
+ * Name of the Event Hub.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Exact time the Event Hub was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdAt;
+
+ /**
+ * Number of days to retain the events for this Event Hub.
+ */
+ @JsonProperty(value = "properties.messageRetentionInDays")
+ private Long messageRetentionInDays;
+
+ /**
+ * Number of partitions created for the Event Hub.
+ */
+ @JsonProperty(value = "properties.partitionCount")
+ private Long partitionCount;
+
+ /**
+ * Current number of shards on the Event Hub.
+ */
+ @JsonProperty(value = "properties.partitionIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List partitionIds;
+
+ /**
+ * Enumerates the possible values for the status of the Event Hub. Possible
+ * values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled',
+ * 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ */
+ @JsonProperty(value = "properties.status")
+ private EntityStatus status;
+
+ /**
+ * The exact time the message was updated.
+ */
+ @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime updatedAt;
+
+ /**
+ * Get location of the resource.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set location of the resource.
+ *
+ * @param location the location value to set
+ * @return the EventHubCreateOrUpdateParameters object itself.
+ */
+ public EventHubCreateOrUpdateParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get aRM type of the Namespace.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set aRM type of the Namespace.
+ *
+ * @param type the type value to set
+ * @return the EventHubCreateOrUpdateParameters object itself.
+ */
+ public EventHubCreateOrUpdateParameters withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get name of the Event Hub.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of the Event Hub.
+ *
+ * @param name the name value to set
+ * @return the EventHubCreateOrUpdateParameters object itself.
+ */
+ public EventHubCreateOrUpdateParameters withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get exact time the Event Hub was created.
+ *
+ * @return the createdAt value
+ */
+ public DateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get number of days to retain the events for this Event Hub.
+ *
+ * @return the messageRetentionInDays value
+ */
+ public Long messageRetentionInDays() {
+ return this.messageRetentionInDays;
+ }
+
+ /**
+ * Set number of days to retain the events for this Event Hub.
+ *
+ * @param messageRetentionInDays the messageRetentionInDays value to set
+ * @return the EventHubCreateOrUpdateParameters object itself.
+ */
+ public EventHubCreateOrUpdateParameters withMessageRetentionInDays(Long messageRetentionInDays) {
+ this.messageRetentionInDays = messageRetentionInDays;
+ return this;
+ }
+
+ /**
+ * Get number of partitions created for the Event Hub.
+ *
+ * @return the partitionCount value
+ */
+ public Long partitionCount() {
+ return this.partitionCount;
+ }
+
+ /**
+ * Set number of partitions created for the Event Hub.
+ *
+ * @param partitionCount the partitionCount value to set
+ * @return the EventHubCreateOrUpdateParameters object itself.
+ */
+ public EventHubCreateOrUpdateParameters withPartitionCount(Long partitionCount) {
+ this.partitionCount = partitionCount;
+ return this;
+ }
+
+ /**
+ * Get current number of shards on the Event Hub.
+ *
+ * @return the partitionIds value
+ */
+ public List partitionIds() {
+ return this.partitionIds;
+ }
+
+ /**
+ * Get enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ *
+ * @return the status value
+ */
+ public EntityStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ *
+ * @param status the status value to set
+ * @return the EventHubCreateOrUpdateParameters object itself.
+ */
+ public EventHubCreateOrUpdateParameters withStatus(EntityStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the exact time the message was updated.
+ *
+ * @return the updatedAt value
+ */
+ public DateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubResource.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubResource.java
new file mode 100644
index 000000000000..f41cd35b9497
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubResource.java
@@ -0,0 +1,232 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.EventHubResourceInner;
+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.eventhub.v2015_08_01.implementation.EventHubManager;
+import org.joda.time.DateTime;
+import java.util.List;
+
+/**
+ * Type representing EventHubResource.
+ */
+public interface EventHubResource extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the messageRetentionInDays value.
+ */
+ Long messageRetentionInDays();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the partitionCount value.
+ */
+ Long partitionCount();
+
+ /**
+ * @return the partitionIds value.
+ */
+ List partitionIds();
+
+ /**
+ * @return the status value.
+ */
+ EntityStatus status();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * The entirety of the EventHubResource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of EventHubResource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a EventHubResource definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ */
+ WithLocation withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify MessageRetentionInDays.
+ */
+ interface WithMessageRetentionInDays {
+ /**
+ * Specifies messageRetentionInDays.
+ */
+ WithCreate withMessageRetentionInDays(Long messageRetentionInDays);
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ WithCreate withName(String name);
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify PartitionCount.
+ */
+ interface WithPartitionCount {
+ /**
+ * Specifies partitionCount.
+ */
+ WithCreate withPartitionCount(Long partitionCount);
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ */
+ WithCreate withStatus(EntityStatus status);
+ }
+
+ /**
+ * The stage of the eventhubresource definition allowing to specify Type.
+ */
+ interface WithType {
+ /**
+ * Specifies type.
+ */
+ WithCreate withType(String type);
+ }
+
+ /**
+ * 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, DefinitionStages.WithMessageRetentionInDays, DefinitionStages.WithName, DefinitionStages.WithPartitionCount, DefinitionStages.WithStatus, DefinitionStages.WithType {
+ }
+ }
+ /**
+ * The template for a EventHubResource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithMessageRetentionInDays, UpdateStages.WithName, UpdateStages.WithPartitionCount, UpdateStages.WithStatus, UpdateStages.WithType {
+ }
+
+ /**
+ * Grouping of EventHubResource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the eventhubresource update allowing to specify MessageRetentionInDays.
+ */
+ interface WithMessageRetentionInDays {
+ /**
+ * Specifies messageRetentionInDays.
+ */
+ Update withMessageRetentionInDays(Long messageRetentionInDays);
+ }
+
+ /**
+ * The stage of the eventhubresource update allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ Update withName(String name);
+ }
+
+ /**
+ * The stage of the eventhubresource update allowing to specify PartitionCount.
+ */
+ interface WithPartitionCount {
+ /**
+ * Specifies partitionCount.
+ */
+ Update withPartitionCount(Long partitionCount);
+ }
+
+ /**
+ * The stage of the eventhubresource update allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ */
+ Update withStatus(EntityStatus status);
+ }
+
+ /**
+ * The stage of the eventhubresource update allowing to specify Type.
+ */
+ interface WithType {
+ /**
+ * Specifies type.
+ */
+ Update withType(String type);
+ }
+
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubs.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubs.java
new file mode 100644
index 000000000000..00e43da36023
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventHubs.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.EventHubsInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventhubNamespaceSharedAccessAuthorizationRuleResource;
+
+/**
+ * Type representing EventHubs.
+ */
+public interface EventHubs extends SupportsCreating, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ EventhubNamespaceSharedAccessAuthorizationRuleResource.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * Gets an Event Hubs description for the specified Event Hub.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName);
+
+ /**
+ * Gets all the Event Hubs in a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAllAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes an Event Hub from the specified Namespace and resource group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName);
+
+ /**
+ * Gets an AuthorizationRule for an Event Hub by rule name.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName);
+
+ /**
+ * Gets the authorization rules for an Event Hub.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName);
+
+ /**
+ * Deletes an Event Hub AuthorizationRule.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName);
+
+ /**
+ * Gets an AuthorizationRule for an Event Hub by rule name.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable posttAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName);
+
+ /**
+ * Gets the ACS and SAS connection strings for the Event Hub.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName);
+
+ /**
+ * Regenerates the ACS and SAS connection strings for the Event Hub.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName);
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventhubNamespaceSharedAccessAuthorizationRuleResource.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventhubNamespaceSharedAccessAuthorizationRuleResource.java
new file mode 100644
index 000000000000..c97e53c9b8dd
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/EventhubNamespaceSharedAccessAuthorizationRuleResource.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.SharedAccessAuthorizationRuleResourceInner;
+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.eventhub.v2015_08_01.implementation.EventHubManager;
+import java.util.List;
+
+/**
+ * Type representing EventhubNamespaceSharedAccessAuthorizationRuleResource.
+ */
+public interface EventhubNamespaceSharedAccessAuthorizationRuleResource extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rights value.
+ */
+ List rights();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the EventhubNamespaceSharedAccessAuthorizationRuleResource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithEventhub, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of EventhubNamespaceSharedAccessAuthorizationRuleResource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a EventhubNamespaceSharedAccessAuthorizationRuleResource definition.
+ */
+ interface Blank extends WithEventhub {
+ }
+
+ /**
+ * The stage of the eventhubnamespacesharedaccessauthorizationruleresource definition allowing to specify Eventhub.
+ */
+ interface WithEventhub {
+ /**
+ * Specifies resourceGroupName, namespaceName, eventHubName.
+ */
+ WithRights withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName);
+ }
+
+ /**
+ * The stage of the eventhubnamespacesharedaccessauthorizationruleresource definition allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ */
+ WithCreate withRights(List rights);
+ }
+
+ /**
+ * The stage of the eventhubnamespacesharedaccessauthorizationruleresource definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the eventhubnamespacesharedaccessauthorizationruleresource definition allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ WithCreate withName(String name);
+ }
+
+ /**
+ * 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, DefinitionStages.WithLocation, DefinitionStages.WithName {
+ }
+ }
+ /**
+ * The template for a EventhubNamespaceSharedAccessAuthorizationRuleResource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithLocation, UpdateStages.WithName {
+ }
+
+ /**
+ * Grouping of EventhubNamespaceSharedAccessAuthorizationRuleResource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the eventhubnamespacesharedaccessauthorizationruleresource update allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ */
+ Update withLocation(String location);
+ }
+
+ /**
+ * The stage of the eventhubnamespacesharedaccessauthorizationruleresource update allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ Update withName(String name);
+ }
+
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceCreateOrUpdateParameters.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceCreateOrUpdateParameters.java
new file mode 100644
index 000000000000..13876b33ce30
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceCreateOrUpdateParameters.java
@@ -0,0 +1,272 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import java.util.Map;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Parameters supplied to the Create Or Update Namespace operation.
+ */
+@JsonFlatten
+public class NamespaceCreateOrUpdateParameters {
+ /**
+ * Namespace location.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /**
+ * The sku property.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * Namespace tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * State of the Namespace. Possible values include: 'Unknown', 'Creating',
+ * 'Created', 'Activating', 'Enabling', 'Active', 'Disabling', 'Disabled',
+ * 'SoftDeleting', 'SoftDeleted', 'Removing', 'Removed', 'Failed'.
+ */
+ @JsonProperty(value = "properties.status")
+ private NamespaceState status;
+
+ /**
+ * Provisioning state of the Namespace.
+ */
+ @JsonProperty(value = "properties.provisioningState")
+ private String provisioningState;
+
+ /**
+ * The time the Namespace was created.
+ */
+ @JsonProperty(value = "properties.createdAt")
+ private DateTime createdAt;
+
+ /**
+ * The time the Namespace was updated.
+ */
+ @JsonProperty(value = "properties.updatedAt")
+ private DateTime updatedAt;
+
+ /**
+ * Endpoint you can use to perform Service Bus operations.
+ */
+ @JsonProperty(value = "properties.serviceBusEndpoint")
+ private String serviceBusEndpoint;
+
+ /**
+ * Identifier for Azure Insights metrics.
+ */
+ @JsonProperty(value = "properties.metricId", access = JsonProperty.Access.WRITE_ONLY)
+ private String metricId;
+
+ /**
+ * Specifies whether this instance is enabled.
+ */
+ @JsonProperty(value = "properties.enabled")
+ private Boolean enabled;
+
+ /**
+ * Get namespace location.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set namespace location.
+ *
+ * @param location the location value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the sku value.
+ *
+ * @return the sku value
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku value.
+ *
+ * @param sku the sku value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get namespace tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set namespace tags.
+ *
+ * @param tags the tags value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get state of the Namespace. Possible values include: 'Unknown', 'Creating', 'Created', 'Activating', 'Enabling', 'Active', 'Disabling', 'Disabled', 'SoftDeleting', 'SoftDeleted', 'Removing', 'Removed', 'Failed'.
+ *
+ * @return the status value
+ */
+ public NamespaceState status() {
+ return this.status;
+ }
+
+ /**
+ * Set state of the Namespace. Possible values include: 'Unknown', 'Creating', 'Created', 'Activating', 'Enabling', 'Active', 'Disabling', 'Disabled', 'SoftDeleting', 'SoftDeleted', 'Removing', 'Removed', 'Failed'.
+ *
+ * @param status the status value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withStatus(NamespaceState status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get provisioning state of the Namespace.
+ *
+ * @return the provisioningState value
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set provisioning state of the Namespace.
+ *
+ * @param provisioningState the provisioningState value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withProvisioningState(String provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the time the Namespace was created.
+ *
+ * @return the createdAt value
+ */
+ public DateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Set the time the Namespace was created.
+ *
+ * @param createdAt the createdAt value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withCreatedAt(DateTime createdAt) {
+ this.createdAt = createdAt;
+ return this;
+ }
+
+ /**
+ * Get the time the Namespace was updated.
+ *
+ * @return the updatedAt value
+ */
+ public DateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Set the time the Namespace was updated.
+ *
+ * @param updatedAt the updatedAt value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withUpdatedAt(DateTime updatedAt) {
+ this.updatedAt = updatedAt;
+ return this;
+ }
+
+ /**
+ * Get endpoint you can use to perform Service Bus operations.
+ *
+ * @return the serviceBusEndpoint value
+ */
+ public String serviceBusEndpoint() {
+ return this.serviceBusEndpoint;
+ }
+
+ /**
+ * Set endpoint you can use to perform Service Bus operations.
+ *
+ * @param serviceBusEndpoint the serviceBusEndpoint value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withServiceBusEndpoint(String serviceBusEndpoint) {
+ this.serviceBusEndpoint = serviceBusEndpoint;
+ return this;
+ }
+
+ /**
+ * Get identifier for Azure Insights metrics.
+ *
+ * @return the metricId value
+ */
+ public String metricId() {
+ return this.metricId;
+ }
+
+ /**
+ * Get specifies whether this instance is enabled.
+ *
+ * @return the enabled value
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set specifies whether this instance is enabled.
+ *
+ * @param enabled the enabled value to set
+ * @return the NamespaceCreateOrUpdateParameters object itself.
+ */
+ public NamespaceCreateOrUpdateParameters withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceResource.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceResource.java
new file mode 100644
index 000000000000..0634cdc79cfb
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceResource.java
@@ -0,0 +1,189 @@
+/**
+ * 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.eventhub.v2015_08_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.eventhub.v2015_08_01.implementation.EventHubManager;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.NamespaceResourceInner;
+
+/**
+ * Type representing NamespaceResource.
+ */
+public interface NamespaceResource extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the enabled value.
+ */
+ Boolean enabled();
+
+ /**
+ * @return the metricId value.
+ */
+ String metricId();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the serviceBusEndpoint value.
+ */
+ String serviceBusEndpoint();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * @return the status value.
+ */
+ NamespaceState status();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * The entirety of the NamespaceResource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of NamespaceResource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a NamespaceResource definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the NamespaceResource definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify CreatedAt.
+ */
+ interface WithCreatedAt {
+ /**
+ * Specifies createdAt.
+ */
+ WithCreate withCreatedAt(DateTime createdAt);
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify Enabled.
+ */
+ interface WithEnabled {
+ /**
+ * Specifies enabled.
+ */
+ WithCreate withEnabled(Boolean enabled);
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify ProvisioningState.
+ */
+ interface WithProvisioningState {
+ /**
+ * Specifies provisioningState.
+ */
+ WithCreate withProvisioningState(String provisioningState);
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify ServiceBusEndpoint.
+ */
+ interface WithServiceBusEndpoint {
+ /**
+ * Specifies serviceBusEndpoint.
+ */
+ WithCreate withServiceBusEndpoint(String serviceBusEndpoint);
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ */
+ WithCreate withSku(Sku sku);
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ */
+ WithCreate withStatus(NamespaceState status);
+ }
+
+ /**
+ * The stage of the namespaceresource update allowing to specify UpdatedAt.
+ */
+ interface WithUpdatedAt {
+ /**
+ * Specifies updatedAt.
+ */
+ WithCreate withUpdatedAt(DateTime updatedAt);
+ }
+
+ /**
+ * 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.WithCreatedAt, DefinitionStages.WithEnabled, DefinitionStages.WithProvisioningState, DefinitionStages.WithServiceBusEndpoint, DefinitionStages.WithSku, DefinitionStages.WithStatus, DefinitionStages.WithUpdatedAt {
+ }
+ }
+ /**
+ * The template for a NamespaceResource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of NamespaceResource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the namespaceresource {0} allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ */
+ Update withSku(Sku sku);
+ }
+
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceSharedAccessAuthorizationRuleResource.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceSharedAccessAuthorizationRuleResource.java
new file mode 100644
index 000000000000..80c2a2318f6b
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceSharedAccessAuthorizationRuleResource.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.SharedAccessAuthorizationRuleResourceInner;
+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.eventhub.v2015_08_01.implementation.EventHubManager;
+import java.util.List;
+
+/**
+ * Type representing NamespaceSharedAccessAuthorizationRuleResource.
+ */
+public interface NamespaceSharedAccessAuthorizationRuleResource extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rights value.
+ */
+ List rights();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the NamespaceSharedAccessAuthorizationRuleResource definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of NamespaceSharedAccessAuthorizationRuleResource definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a NamespaceSharedAccessAuthorizationRuleResource definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the namespacesharedaccessauthorizationruleresource definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ */
+ WithRights withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the namespacesharedaccessauthorizationruleresource definition allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ */
+ WithCreate withRights(List rights);
+ }
+
+ /**
+ * The stage of the namespacesharedaccessauthorizationruleresource definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the namespacesharedaccessauthorizationruleresource definition allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ WithCreate withName(String name);
+ }
+
+ /**
+ * 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, DefinitionStages.WithLocation, DefinitionStages.WithName {
+ }
+ }
+ /**
+ * The template for a NamespaceSharedAccessAuthorizationRuleResource update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithLocation, UpdateStages.WithName {
+ }
+
+ /**
+ * Grouping of NamespaceSharedAccessAuthorizationRuleResource update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the namespacesharedaccessauthorizationruleresource update allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ */
+ Update withLocation(String location);
+ }
+
+ /**
+ * The stage of the namespacesharedaccessauthorizationruleresource update allowing to specify Name.
+ */
+ interface WithName {
+ /**
+ * Specifies name.
+ */
+ Update withName(String name);
+ }
+
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceState.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceState.java
new file mode 100644
index 000000000000..8d465d376ba9
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceState.java
@@ -0,0 +1,86 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for NamespaceState.
+ */
+public enum NamespaceState {
+ /** Enum value Unknown. */
+ UNKNOWN("Unknown"),
+
+ /** Enum value Creating. */
+ CREATING("Creating"),
+
+ /** Enum value Created. */
+ CREATED("Created"),
+
+ /** Enum value Activating. */
+ ACTIVATING("Activating"),
+
+ /** Enum value Enabling. */
+ ENABLING("Enabling"),
+
+ /** Enum value Active. */
+ ACTIVE("Active"),
+
+ /** Enum value Disabling. */
+ DISABLING("Disabling"),
+
+ /** Enum value Disabled. */
+ DISABLED("Disabled"),
+
+ /** Enum value SoftDeleting. */
+ SOFT_DELETING("SoftDeleting"),
+
+ /** Enum value SoftDeleted. */
+ SOFT_DELETED("SoftDeleted"),
+
+ /** Enum value Removing. */
+ REMOVING("Removing"),
+
+ /** Enum value Removed. */
+ REMOVED("Removed"),
+
+ /** Enum value Failed. */
+ FAILED("Failed");
+
+ /** The actual serialized value for a NamespaceState instance. */
+ private String value;
+
+ NamespaceState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a NamespaceState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed NamespaceState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static NamespaceState fromString(String value) {
+ NamespaceState[] items = NamespaceState.values();
+ for (NamespaceState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceUpdateParameter.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceUpdateParameter.java
new file mode 100644
index 000000000000..cdc7dbbc98d0
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/NamespaceUpdateParameter.java
@@ -0,0 +1,70 @@
+/**
+ * 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.eventhub.v2015_08_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters supplied to the Patch/update Namespace operation.
+ */
+public class NamespaceUpdateParameter {
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * The sku of the created Namespace.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * 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 NamespaceUpdateParameter object itself.
+ */
+ public NamespaceUpdateParameter withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the sku of the created Namespace.
+ *
+ * @return the sku value
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku of the created Namespace.
+ *
+ * @param sku the sku value to set
+ * @return the NamespaceUpdateParameter object itself.
+ */
+ public NamespaceUpdateParameter withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Namespaces.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Namespaces.java
new file mode 100644
index 000000000000..3db36e54b6db
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Namespaces.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.NamespacesInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.eventhub.v2015_08_01.NamespaceSharedAccessAuthorizationRuleResource;
+import rx.Completable;
+
+/**
+ * Type representing Namespaces.
+ */
+public interface Namespaces extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ NamespaceSharedAccessAuthorizationRuleResource.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * Check the give Namespace name availability.
+ *
+ * @param name Name to check the namespace name availability
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkNameAvailabilityAsync(String name);
+
+ /**
+ * Gets an AuthorizationRule for a Namespace by rule name.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+ /**
+ * Gets a list of authorization rules for a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes an AuthorizationRule for a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+ /**
+ * Gets the primary and secondary connection strings for the Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+ /**
+ * Regenerates the primary or secondary connection strings for the specified Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Operation.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Operation.java
new file mode 100644
index 000000000000..c58165e6b572
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.EventHubManager;
+import com.microsoft.azure.management.eventhub.v2015_08_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/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/OperationDisplay.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/OperationDisplay.java
new file mode 100644
index 000000000000..b971b7fc1384
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/OperationDisplay.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft.EventHub.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * Resource on which the operation is performed: Invoice, etc.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * Operation type: Read, write, delete, etc.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * Get service provider: Microsoft.EventHub.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get resource on which the operation is performed: Invoice, etc.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get operation type: Read, write, delete, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Operations.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Operations.java
new file mode 100644
index 000000000000..6641c6f64e45
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_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.eventhub.v2015_08_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available Event Hub REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Policykey.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Policykey.java
new file mode 100644
index 000000000000..7e0f34a8ebf0
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Policykey.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for Policykey.
+ */
+public enum Policykey {
+ /** Enum value PrimaryKey. */
+ PRIMARY_KEY("PrimaryKey"),
+
+ /** Enum value SecondaryKey. */
+ SECONDARY_KEY("SecondaryKey");
+
+ /** The actual serialized value for a Policykey instance. */
+ private String value;
+
+ Policykey(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a Policykey instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed Policykey object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static Policykey fromString(String value) {
+ Policykey[] items = Policykey.values();
+ for (Policykey item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/RegenerateKeysParameters.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/RegenerateKeysParameters.java
new file mode 100644
index 000000000000..650be12cbf79
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/RegenerateKeysParameters.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters supplied to the Regenerate Authorization Rule keys operation.
+ */
+public class RegenerateKeysParameters {
+ /**
+ * Key that needs to be regenerated. Possible values include: 'PrimaryKey',
+ * 'SecondaryKey'.
+ */
+ @JsonProperty(value = "policykey")
+ private Policykey policykey;
+
+ /**
+ * Get key that needs to be regenerated. Possible values include: 'PrimaryKey', 'SecondaryKey'.
+ *
+ * @return the policykey value
+ */
+ public Policykey policykey() {
+ return this.policykey;
+ }
+
+ /**
+ * Set key that needs to be regenerated. Possible values include: 'PrimaryKey', 'SecondaryKey'.
+ *
+ * @param policykey the policykey value to set
+ * @return the RegenerateKeysParameters object itself.
+ */
+ public RegenerateKeysParameters withPolicykey(Policykey policykey) {
+ this.policykey = policykey;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ResourceListKeys.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ResourceListKeys.java
new file mode 100644
index 000000000000..11028fd1f0b6
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/ResourceListKeys.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.eventhub.v2015_08_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.EventHubManager;
+import com.microsoft.azure.management.eventhub.v2015_08_01.implementation.ResourceListKeysInner;
+
+/**
+ * Type representing ResourceListKeys.
+ */
+public interface ResourceListKeys extends HasInner, HasManager {
+ /**
+ * @return the keyName value.
+ */
+ String keyName();
+
+ /**
+ * @return the primaryConnectionString value.
+ */
+ String primaryConnectionString();
+
+ /**
+ * @return the primaryKey value.
+ */
+ String primaryKey();
+
+ /**
+ * @return the secondaryConnectionString value.
+ */
+ String secondaryConnectionString();
+
+ /**
+ * @return the secondaryKey value.
+ */
+ String secondaryKey();
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SharedAccessAuthorizationRuleCreateOrUpdateParameters.java
new file mode 100644
index 000000000000..9228f8aa7b4a
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SharedAccessAuthorizationRuleCreateOrUpdateParameters.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.eventhub.v2015_08_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Parameters supplied to the Create Or Update Authorization Rules operation.
+ */
+@JsonFlatten
+public class SharedAccessAuthorizationRuleCreateOrUpdateParameters {
+ /**
+ * Data center location.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Name of the AuthorizationRule.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * The rights associated with the rule.
+ */
+ @JsonProperty(value = "properties.rights", required = true)
+ private List rights;
+
+ /**
+ * Get data center location.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set data center location.
+ *
+ * @param location the location value to set
+ * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself.
+ */
+ public SharedAccessAuthorizationRuleCreateOrUpdateParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get name of the AuthorizationRule.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of the AuthorizationRule.
+ *
+ * @param name the name value to set
+ * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself.
+ */
+ public SharedAccessAuthorizationRuleCreateOrUpdateParameters withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the rights associated with the rule.
+ *
+ * @return the rights value
+ */
+ public List rights() {
+ return this.rights;
+ }
+
+ /**
+ * Set the rights associated with the rule.
+ *
+ * @param rights the rights value to set
+ * @return the SharedAccessAuthorizationRuleCreateOrUpdateParameters object itself.
+ */
+ public SharedAccessAuthorizationRuleCreateOrUpdateParameters withRights(List rights) {
+ this.rights = rights;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Sku.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Sku.java
new file mode 100644
index 000000000000..8ba789061de3
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/Sku.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * SKU parameters supplied to the create Namespace operation.
+ */
+public class Sku {
+ /**
+ * Name of this SKU. Possible values include: 'Basic', 'Standard'.
+ */
+ @JsonProperty(value = "name")
+ private SkuName name;
+
+ /**
+ * The billing tier of this particular SKU. Possible values include:
+ * 'Basic', 'Standard', 'Premium'.
+ */
+ @JsonProperty(value = "tier", required = true)
+ private SkuTier tier;
+
+ /**
+ * The Event Hubs throughput units.
+ */
+ @JsonProperty(value = "capacity")
+ private Integer capacity;
+
+ /**
+ * Get name of this SKU. Possible values include: 'Basic', 'Standard'.
+ *
+ * @return the name value
+ */
+ public SkuName name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of this SKU. Possible values include: 'Basic', 'Standard'.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(SkuName name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the billing tier of this particular SKU. Possible values include: 'Basic', 'Standard', 'Premium'.
+ *
+ * @return the tier value
+ */
+ public SkuTier tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the billing tier of this particular SKU. Possible values include: 'Basic', 'Standard', 'Premium'.
+ *
+ * @param tier the tier value to set
+ * @return the Sku object itself.
+ */
+ public Sku withTier(SkuTier tier) {
+ this.tier = tier;
+ return this;
+ }
+
+ /**
+ * Get the Event Hubs throughput units.
+ *
+ * @return the capacity value
+ */
+ public Integer capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Set the Event Hubs throughput units.
+ *
+ * @param capacity the capacity value to set
+ * @return the Sku object itself.
+ */
+ public Sku withCapacity(Integer capacity) {
+ this.capacity = capacity;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SkuName.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SkuName.java
new file mode 100644
index 000000000000..c8eadc22e018
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SkuName.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.eventhub.v2015_08_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for SkuName.
+ */
+public final class SkuName extends ExpandableStringEnum {
+ /** Static value Basic for SkuName. */
+ public static final SkuName BASIC = fromString("Basic");
+
+ /** Static value Standard for SkuName. */
+ public static final SkuName STANDARD = fromString("Standard");
+
+ /**
+ * Creates or finds a SkuName from its string representation.
+ * @param name a name to look for
+ * @return the corresponding SkuName
+ */
+ @JsonCreator
+ public static SkuName fromString(String name) {
+ return fromString(name, SkuName.class);
+ }
+
+ /**
+ * @return known SkuName values
+ */
+ public static Collection values() {
+ return values(SkuName.class);
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SkuTier.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SkuTier.java
new file mode 100644
index 000000000000..59d073a28ff5
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/SkuTier.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.eventhub.v2015_08_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for SkuTier.
+ */
+public final class SkuTier extends ExpandableStringEnum {
+ /** Static value Basic for SkuTier. */
+ public static final SkuTier BASIC = fromString("Basic");
+
+ /** Static value Standard for SkuTier. */
+ public static final SkuTier STANDARD = fromString("Standard");
+
+ /** Static value Premium for SkuTier. */
+ public static final SkuTier PREMIUM = fromString("Premium");
+
+ /**
+ * Creates or finds a SkuTier from its string representation.
+ * @param name a name to look for
+ * @return the corresponding SkuTier
+ */
+ @JsonCreator
+ public static SkuTier fromString(String name) {
+ return fromString(name, SkuTier.class);
+ }
+
+ /**
+ * @return known SkuTier values
+ */
+ public static Collection values() {
+ return values(SkuTier.class);
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/UnavailableReason.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/UnavailableReason.java
new file mode 100644
index 000000000000..bc295db21d13
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/UnavailableReason.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.eventhub.v2015_08_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for UnavailableReason.
+ */
+public enum UnavailableReason {
+ /** Enum value None. */
+ NONE("None"),
+
+ /** Enum value InvalidName. */
+ INVALID_NAME("InvalidName"),
+
+ /** Enum value SubscriptionIsDisabled. */
+ SUBSCRIPTION_IS_DISABLED("SubscriptionIsDisabled"),
+
+ /** Enum value NameInUse. */
+ NAME_IN_USE("NameInUse"),
+
+ /** Enum value NameInLockdown. */
+ NAME_IN_LOCKDOWN("NameInLockdown"),
+
+ /** Enum value TooManyNamespaceInCurrentSubscription. */
+ TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION("TooManyNamespaceInCurrentSubscription");
+
+ /** The actual serialized value for a UnavailableReason instance. */
+ private String value;
+
+ UnavailableReason(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a UnavailableReason instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed UnavailableReason object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static UnavailableReason fromString(String value) {
+ UnavailableReason[] items = UnavailableReason.values();
+ for (UnavailableReason item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/CheckNameAvailabilityResultImpl.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/CheckNameAvailabilityResultImpl.java
new file mode 100644
index 000000000000..8465247e96a3
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/CheckNameAvailabilityResultImpl.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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.management.eventhub.v2015_08_01.CheckNameAvailabilityResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.eventhub.v2015_08_01.UnavailableReason;
+
+class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult {
+ private final EventHubManager manager;
+ CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, EventHubManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public EventHubManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String message() {
+ return this.inner().message();
+ }
+
+ @Override
+ public Boolean nameAvailable() {
+ return this.inner().nameAvailable();
+ }
+
+ @Override
+ public UnavailableReason reason() {
+ return this.inner().reason();
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/CheckNameAvailabilityResultInner.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/CheckNameAvailabilityResultInner.java
new file mode 100644
index 000000000000..621a389487dc
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/CheckNameAvailabilityResultInner.java
@@ -0,0 +1,88 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.management.eventhub.v2015_08_01.UnavailableReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The Result of the CheckNameAvailability operation.
+ */
+public class CheckNameAvailabilityResultInner {
+ /**
+ * Value indicating Namespace is availability, true if the Namespace is
+ * available; otherwise, false.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /**
+ * The reason for unavailability of a Namespace. Possible values include:
+ * 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse',
+ * 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'.
+ */
+ @JsonProperty(value = "reason")
+ private UnavailableReason reason;
+
+ /**
+ * The detailed info regarding the reason associated with the Namespace.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Get value indicating Namespace is availability, true if the Namespace is available; otherwise, false.
+ *
+ * @return the nameAvailable value
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set value indicating Namespace is availability, true if the Namespace is available; otherwise, false.
+ *
+ * @param nameAvailable the nameAvailable value to set
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the reason for unavailability of a Namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'.
+ *
+ * @return the reason value
+ */
+ public UnavailableReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason for unavailability of a Namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'.
+ *
+ * @param reason the reason value to set
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the detailed info regarding the reason associated with the Namespace.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupResourceImpl.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupResourceImpl.java
new file mode 100644
index 000000000000..97ea9f5e63e7
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupResourceImpl.java
@@ -0,0 +1,169 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroupResource;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroupCreateOrUpdateParameters;
+import org.joda.time.DateTime;
+import rx.functions.Func1;
+
+class ConsumerGroupResourceImpl extends CreatableUpdatableImpl implements ConsumerGroupResource, ConsumerGroupResource.Definition, ConsumerGroupResource.Update {
+ private final EventHubManager manager;
+ private String resourceGroupName;
+ private String namespaceName;
+ private String eventHubName;
+ private String consumerGroupName;
+ private ConsumerGroupCreateOrUpdateParameters createOrUpdateParameter;
+
+ ConsumerGroupResourceImpl(String name, EventHubManager manager) {
+ super(name, new ConsumerGroupResourceInner());
+ this.manager = manager;
+ // Set resource name
+ this.consumerGroupName = name;
+ //
+ this.createOrUpdateParameter = new ConsumerGroupCreateOrUpdateParameters();
+ }
+
+ ConsumerGroupResourceImpl(ConsumerGroupResourceInner inner, EventHubManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.consumerGroupName = inner.name();
+ // resource ancestor names
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces");
+ this.eventHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventhubs");
+ this.consumerGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "consumergroups");
+ //
+ this.createOrUpdateParameter = new ConsumerGroupCreateOrUpdateParameters();
+ }
+
+ @Override
+ public EventHubManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ ConsumerGroupsInner client = this.manager().inner().consumerGroups();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.consumerGroupName, this.createOrUpdateParameter)
+ .map(new Func1() {
+ @Override
+ public ConsumerGroupResourceInner call(ConsumerGroupResourceInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ ConsumerGroupsInner client = this.manager().inner().consumerGroups();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.consumerGroupName, this.createOrUpdateParameter)
+ .map(new Func1() {
+ @Override
+ public ConsumerGroupResourceInner call(ConsumerGroupResourceInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ConsumerGroupsInner client = this.manager().inner().consumerGroups();
+ return client.getAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.consumerGroupName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.createOrUpdateParameter = new ConsumerGroupCreateOrUpdateParameters();
+ }
+
+ @Override
+ public DateTime createdAt() {
+ return this.inner().createdAt();
+ }
+
+ @Override
+ public String eventHubPath() {
+ return this.inner().eventHubPath();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DateTime updatedAt() {
+ return this.inner().updatedAt();
+ }
+
+ @Override
+ public String userMetadata() {
+ return this.inner().userMetadata();
+ }
+
+ @Override
+ public ConsumerGroupResourceImpl withExistingEventhub(String resourceGroupName, String namespaceName, String eventHubName) {
+ this.resourceGroupName = resourceGroupName;
+ this.namespaceName = namespaceName;
+ this.eventHubName = eventHubName;
+ return this;
+ }
+
+ @Override
+ public ConsumerGroupResourceImpl withLocation(String location) {
+ this.createOrUpdateParameter.withLocation(location);
+ return this;
+ }
+
+ @Override
+ public ConsumerGroupResourceImpl withName(String name) {
+ this.createOrUpdateParameter.withName(name);
+ return this;
+ }
+
+ @Override
+ public ConsumerGroupResourceImpl withType(String type) {
+ this.createOrUpdateParameter.withType(type);
+ return this;
+ }
+
+ @Override
+ public ConsumerGroupResourceImpl withUserMetadata(String userMetadata) {
+ this.createOrUpdateParameter.withUserMetadata(userMetadata);
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupResourceInner.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupResourceInner.java
new file mode 100644
index 000000000000..ba1bd94addb0
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupResourceInner.java
@@ -0,0 +1,118 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Single item in List or Get Consumer group operation.
+ */
+@JsonFlatten
+public class ConsumerGroupResourceInner extends ProxyResource {
+ /**
+ * Exact time the message was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdAt;
+
+ /**
+ * The path of the Event Hub.
+ */
+ @JsonProperty(value = "properties.eventHubPath", access = JsonProperty.Access.WRITE_ONLY)
+ private String eventHubPath;
+
+ /**
+ * The exact time the message was updated.
+ */
+ @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime updatedAt;
+
+ /**
+ * The user metadata.
+ */
+ @JsonProperty(value = "properties.userMetadata")
+ private String userMetadata;
+
+ /**
+ * Resource location.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Get exact time the message was created.
+ *
+ * @return the createdAt value
+ */
+ public DateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the path of the Event Hub.
+ *
+ * @return the eventHubPath value
+ */
+ public String eventHubPath() {
+ return this.eventHubPath;
+ }
+
+ /**
+ * Get the exact time the message was updated.
+ *
+ * @return the updatedAt value
+ */
+ public DateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get the user metadata.
+ *
+ * @return the userMetadata value
+ */
+ public String userMetadata() {
+ return this.userMetadata;
+ }
+
+ /**
+ * Set the user metadata.
+ *
+ * @param userMetadata the userMetadata value to set
+ * @return the ConsumerGroupResourceInner object itself.
+ */
+ public ConsumerGroupResourceInner withUserMetadata(String userMetadata) {
+ this.userMetadata = userMetadata;
+ return this;
+ }
+
+ /**
+ * Get resource location.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set resource location.
+ *
+ * @param location the location value to set
+ * @return the ConsumerGroupResourceInner object itself.
+ */
+ public ConsumerGroupResourceInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupsImpl.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupsImpl.java
new file mode 100644
index 000000000000..e50f6b796310
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupsImpl.java
@@ -0,0 +1,81 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroups;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroupResource;
+
+class ConsumerGroupsImpl extends WrapperImpl implements ConsumerGroups {
+ private final EventHubManager manager;
+
+ ConsumerGroupsImpl(EventHubManager manager) {
+ super(manager.inner().consumerGroups());
+ this.manager = manager;
+ }
+
+ public EventHubManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public ConsumerGroupResourceImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private ConsumerGroupResourceImpl wrapModel(ConsumerGroupResourceInner inner) {
+ return new ConsumerGroupResourceImpl(inner, manager());
+ }
+
+ private ConsumerGroupResourceImpl wrapModel(String name) {
+ return new ConsumerGroupResourceImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listAllAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) {
+ ConsumerGroupsInner client = this.inner();
+ return client.listAllAsync(resourceGroupName, namespaceName, eventHubName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ConsumerGroupResource call(ConsumerGroupResourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ ConsumerGroupsInner client = this.inner();
+ return client.getAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName)
+ .map(new Func1() {
+ @Override
+ public ConsumerGroupResource call(ConsumerGroupResourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ ConsumerGroupsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toCompletable();
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupsInner.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupsInner.java
new file mode 100644
index 000000000000..cef2d9cf8e06
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/ConsumerGroupsInner.java
@@ -0,0 +1,637 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroupCreateOrUpdateParameters;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+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.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ConsumerGroups.
+ */
+public class ConsumerGroupsInner {
+ /** The Retrofit service to perform REST calls. */
+ private ConsumerGroupsService service;
+ /** The service client containing this operation class. */
+ private EventHubManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ConsumerGroupsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ConsumerGroupsInner(Retrofit retrofit, EventHubManagementClientImpl client) {
+ this.service = retrofit.create(ConsumerGroupsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ConsumerGroups to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ConsumerGroupsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroups createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("consumerGroupName") String consumerGroupName, @Path("subscriptionId") String subscriptionId, @Body ConsumerGroupCreateOrUpdateParameters parameters, @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.eventhub.v2015_08_01.ConsumerGroups delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("consumerGroupName") String consumerGroupName, @Path("subscriptionId") String subscriptionId, @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.eventhub.v2015_08_01.ConsumerGroups get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("consumerGroupName") String consumerGroupName, @Path("subscriptionId") String subscriptionId, @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.eventhub.v2015_08_01.ConsumerGroups listAll" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups")
+ Observable> listAll(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @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.eventhub.v2015_08_01.ConsumerGroups listAllNext" })
+ @GET
+ Observable> listAllNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ConsumerGroupResourceInner object if successful.
+ */
+ public ConsumerGroupResourceInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupCreateOrUpdateParameters parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @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 namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters), serviceCallback);
+ }
+
+ /**
+ * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ConsumerGroupResourceInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupCreateOrUpdateParameters parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName, parameters).map(new Func1, ConsumerGroupResourceInner>() {
+ @Override
+ public ConsumerGroupResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @param parameters Parameters supplied to create or update a consumer group resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ConsumerGroupResourceInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, ConsumerGroupCreateOrUpdateParameters parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (namespaceName == null) {
+ throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null.");
+ }
+ if (eventHubName == null) {
+ throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null.");
+ }
+ if (consumerGroupName == null) {
+ throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.createOrUpdate(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), 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);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a consumer group from the specified Event Hub and resource group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException 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 namespaceName, String eventHubName, String consumerGroupName) {
+ deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a consumer group from the specified Event Hub and resource group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @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 deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName), serviceCallback);
+ }
+
+ /**
+ * Deletes a consumer group from the specified Event Hub and resource group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a consumer group from the specified Event Hub and resource group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (namespaceName == null) {
+ throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null.");
+ }
+ if (eventHubName == null) {
+ throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null.");
+ }
+ if (consumerGroupName == null) {
+ throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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.delete(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a description for the specified consumer group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ConsumerGroupResourceInner object if successful.
+ */
+ public ConsumerGroupResourceInner get(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a description for the specified consumer group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @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 namespaceName, String eventHubName, String consumerGroupName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName), serviceCallback);
+ }
+
+ /**
+ * Gets a description for the specified consumer group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ConsumerGroupResourceInner object
+ */
+ public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, consumerGroupName).map(new Func1, ConsumerGroupResourceInner>() {
+ @Override
+ public ConsumerGroupResourceInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a description for the specified consumer group.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @param consumerGroupName The consumer group name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ConsumerGroupResourceInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, String consumerGroupName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (namespaceName == null) {
+ throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null.");
+ }
+ if (eventHubName == null) {
+ throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null.");
+ }
+ if (consumerGroupName == null) {
+ throw new IllegalArgumentException("Parameter consumerGroupName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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(resourceGroupName, namespaceName, eventHubName, consumerGroupName, this.client.subscriptionId(), 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 CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ConsumerGroupResourceInner> object if successful.
+ */
+ public PagedList listAll(final String resourceGroupName, final String namespaceName, final String eventHubName) {
+ ServiceResponse> response = listAllSinglePageAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @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> listAllAsync(final String resourceGroupName, final String namespaceName, final String eventHubName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listAllSinglePageAsync(resourceGroupName, namespaceName, eventHubName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listAllNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ConsumerGroupResourceInner> object
+ */
+ public Observable> listAllAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) {
+ return listAllWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param resourceGroupName Name of the resource group within the azure subscription.
+ * @param namespaceName The Namespace name
+ * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ConsumerGroupResourceInner> object
+ */
+ public Observable>> listAllWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) {
+ return listAllSinglePageAsync(resourceGroupName, namespaceName, eventHubName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription.
+ ServiceResponse> * @param namespaceName The Namespace name
+ ServiceResponse> * @param eventHubName The Event Hub name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ConsumerGroupResourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listAllSinglePageAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (namespaceName == null) {
+ throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null.");
+ }
+ if (eventHubName == null) {
+ throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() 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.listAll(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listAllDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<ConsumerGroupResourceInner> object if successful.
+ */
+ public PagedList listAllNext(final String nextPageLink) {
+ ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @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> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listAllNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listAllNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ConsumerGroupResourceInner> object
+ */
+ public Observable> listAllNextAsync(final String nextPageLink) {
+ return listAllNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ConsumerGroupResourceInner> object
+ */
+ public Observable>> listAllNextWithServiceResponseAsync(final String nextPageLink) {
+ return listAllNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ConsumerGroupResourceInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listAllNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listAllNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubManagementClientImpl.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubManagementClientImpl.java
new file mode 100644
index 000000000000..1d2981ff6ec5
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubManagementClientImpl.java
@@ -0,0 +1,238 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the EventHubManagementClientImpl class.
+ */
+public class EventHubManagementClientImpl extends AzureServiceClient {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */
+ private String subscriptionId;
+
+ /**
+ * Gets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ *
+ * @return the subscriptionId value.
+ */
+ public String subscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * Sets Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the service client itself
+ */
+ public EventHubManagementClientImpl withSubscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /** Client API Version. */
+ private String apiVersion;
+
+ /**
+ * Gets Client API Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String apiVersion() {
+ return this.apiVersion;
+ }
+
+ /** Gets or sets the preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets Gets or sets the preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets Gets or sets the preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public EventHubManagementClientImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public EventHubManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ private boolean generateClientRequestId;
+
+ /**
+ * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @return the generateClientRequestId value.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ public EventHubManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The OperationsInner object to access its operations.
+ */
+ private OperationsInner operations;
+
+ /**
+ * Gets the OperationsInner object to access its operations.
+ * @return the OperationsInner object.
+ */
+ public OperationsInner operations() {
+ return this.operations;
+ }
+
+ /**
+ * The NamespacesInner object to access its operations.
+ */
+ private NamespacesInner namespaces;
+
+ /**
+ * Gets the NamespacesInner object to access its operations.
+ * @return the NamespacesInner object.
+ */
+ public NamespacesInner namespaces() {
+ return this.namespaces;
+ }
+
+ /**
+ * The EventHubsInner object to access its operations.
+ */
+ private EventHubsInner eventHubs;
+
+ /**
+ * Gets the EventHubsInner object to access its operations.
+ * @return the EventHubsInner object.
+ */
+ public EventHubsInner eventHubs() {
+ return this.eventHubs;
+ }
+
+ /**
+ * The ConsumerGroupsInner object to access its operations.
+ */
+ private ConsumerGroupsInner consumerGroups;
+
+ /**
+ * Gets the ConsumerGroupsInner object to access its operations.
+ * @return the ConsumerGroupsInner object.
+ */
+ public ConsumerGroupsInner consumerGroups() {
+ return this.consumerGroups;
+ }
+
+ /**
+ * Initializes an instance of EventHubManagementClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public EventHubManagementClientImpl(ServiceClientCredentials credentials) {
+ this("https://management.azure.com", credentials);
+ }
+
+ /**
+ * Initializes an instance of EventHubManagementClient client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public EventHubManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of EventHubManagementClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public EventHubManagementClientImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.apiVersion = "2015-08-01";
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.operations = new OperationsInner(restClient().retrofit(), this);
+ this.namespaces = new NamespacesInner(restClient().retrofit(), this);
+ this.eventHubs = new EventHubsInner(restClient().retrofit(), this);
+ this.consumerGroups = new ConsumerGroupsInner(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s)", super.userAgent(), "EventHubManagementClient", "2015-08-01");
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubManager.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubManager.java
new file mode 100644
index 000000000000..6923e3f77748
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubManager.java
@@ -0,0 +1,135 @@
+/**
+ * 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.eventhub.v2015_08_01.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.eventhub.v2015_08_01.Operations;
+import com.microsoft.azure.management.eventhub.v2015_08_01.Namespaces;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventHubs;
+import com.microsoft.azure.management.eventhub.v2015_08_01.ConsumerGroups;
+import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
+import com.microsoft.azure.arm.resources.implementation.ManagerCore;
+
+/**
+ * Entry point to Azure EventHub resource management.
+ */
+public final class EventHubManager extends ManagerCore {
+ private Operations operations;
+ private Namespaces namespaces;
+ private EventHubs eventHubs;
+ private ConsumerGroups consumerGroups;
+ /**
+ * Get a Configurable instance that can be used to create EventHubManager with optional configuration.
+ *
+ * @return the instance allowing configurations
+ */
+ public static Configurable configure() {
+ return new EventHubManager.ConfigurableImpl();
+ }
+ /**
+ * Creates an instance of EventHubManager that exposes EventHub resource management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the EventHubManager
+ */
+ public static EventHubManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return new EventHubManager(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 EventHubManager that exposes EventHub resource management API entry points.
+ *
+ * @param restClient the RestClient to be used for API calls.
+ * @param subscriptionId the subscription UUID
+ * @return the EventHubManager
+ */
+ public static EventHubManager authenticate(RestClient restClient, String subscriptionId) {
+ return new EventHubManager(restClient, subscriptionId);
+ }
+ /**
+ * The interface allowing configurations to be set.
+ */
+ public interface Configurable extends AzureConfigurable {
+ /**
+ * Creates an instance of EventHubManager that exposes EventHub management API entry points.
+ *
+ * @param credentials the credentials to use
+ * @param subscriptionId the subscription UUID
+ * @return the interface exposing EventHub management API entry points that work across subscriptions
+ */
+ EventHubManager 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 Namespaces.
+ */
+ public Namespaces namespaces() {
+ if (this.namespaces == null) {
+ this.namespaces = new NamespacesImpl(this);
+ }
+ return this.namespaces;
+ }
+
+ /**
+ * @return Entry point to manage EventHubs.
+ */
+ public EventHubs eventHubs() {
+ if (this.eventHubs == null) {
+ this.eventHubs = new EventHubsImpl(this);
+ }
+ return this.eventHubs;
+ }
+
+ /**
+ * @return Entry point to manage ConsumerGroups.
+ */
+ public ConsumerGroups consumerGroups() {
+ if (this.consumerGroups == null) {
+ this.consumerGroups = new ConsumerGroupsImpl(this);
+ }
+ return this.consumerGroups;
+ }
+
+ /**
+ * The implementation for Configurable interface.
+ */
+ private static final class ConfigurableImpl extends AzureConfigurableCoreImpl implements Configurable {
+ public EventHubManager authenticate(AzureTokenCredentials credentials, String subscriptionId) {
+ return EventHubManager.authenticate(buildRestClient(credentials), subscriptionId);
+ }
+ }
+ private EventHubManager(RestClient restClient, String subscriptionId) {
+ super(
+ restClient,
+ subscriptionId,
+ new EventHubManagementClientImpl(restClient).withSubscriptionId(subscriptionId));
+ }
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubResourceImpl.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubResourceImpl.java
new file mode 100644
index 000000000000..9ca1cc794158
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubResourceImpl.java
@@ -0,0 +1,190 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventHubResource;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventHubCreateOrUpdateParameters;
+import org.joda.time.DateTime;
+import java.util.List;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EntityStatus;
+import rx.functions.Func1;
+
+class EventHubResourceImpl extends CreatableUpdatableImpl implements EventHubResource, EventHubResource.Definition, EventHubResource.Update {
+ private final EventHubManager manager;
+ private String resourceGroupName;
+ private String namespaceName;
+ private String eventHubName;
+ private EventHubCreateOrUpdateParameters createOrUpdateParameter;
+
+ EventHubResourceImpl(String name, EventHubManager manager) {
+ super(name, new EventHubResourceInner());
+ this.manager = manager;
+ // Set resource name
+ this.eventHubName = name;
+ //
+ this.createOrUpdateParameter = new EventHubCreateOrUpdateParameters();
+ }
+
+ EventHubResourceImpl(EventHubResourceInner inner, EventHubManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.eventHubName = inner.name();
+ // resource ancestor names
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces");
+ this.eventHubName = IdParsingUtils.getValueFromIdByName(inner.id(), "eventhubs");
+ //
+ this.createOrUpdateParameter = new EventHubCreateOrUpdateParameters();
+ }
+
+ @Override
+ public EventHubManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ EventHubsInner client = this.manager().inner().eventHubs();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.createOrUpdateParameter)
+ .map(new Func1() {
+ @Override
+ public EventHubResourceInner call(EventHubResourceInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ EventHubsInner client = this.manager().inner().eventHubs();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.eventHubName, this.createOrUpdateParameter)
+ .map(new Func1() {
+ @Override
+ public EventHubResourceInner call(EventHubResourceInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ EventHubsInner client = this.manager().inner().eventHubs();
+ return client.getAsync(this.resourceGroupName, this.namespaceName, this.eventHubName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.createOrUpdateParameter = new EventHubCreateOrUpdateParameters();
+ }
+
+ @Override
+ public DateTime createdAt() {
+ return this.inner().createdAt();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String location() {
+ return this.inner().location();
+ }
+
+ @Override
+ public Long messageRetentionInDays() {
+ return this.inner().messageRetentionInDays();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public Long partitionCount() {
+ return this.inner().partitionCount();
+ }
+
+ @Override
+ public List partitionIds() {
+ return this.inner().partitionIds();
+ }
+
+ @Override
+ public EntityStatus status() {
+ return this.inner().status();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DateTime updatedAt() {
+ return this.inner().updatedAt();
+ }
+
+ @Override
+ public EventHubResourceImpl withExistingNamespace(String resourceGroupName, String namespaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.namespaceName = namespaceName;
+ return this;
+ }
+
+ @Override
+ public EventHubResourceImpl withLocation(String location) {
+ this.createOrUpdateParameter.withLocation(location);
+ return this;
+ }
+
+ @Override
+ public EventHubResourceImpl withMessageRetentionInDays(Long messageRetentionInDays) {
+ this.createOrUpdateParameter.withMessageRetentionInDays(messageRetentionInDays);
+ return this;
+ }
+
+ @Override
+ public EventHubResourceImpl withName(String name) {
+ this.createOrUpdateParameter.withName(name);
+ return this;
+ }
+
+ @Override
+ public EventHubResourceImpl withPartitionCount(Long partitionCount) {
+ this.createOrUpdateParameter.withPartitionCount(partitionCount);
+ return this;
+ }
+
+ @Override
+ public EventHubResourceImpl withStatus(EntityStatus status) {
+ this.createOrUpdateParameter.withStatus(status);
+ return this;
+ }
+
+ @Override
+ public EventHubResourceImpl withType(String type) {
+ this.createOrUpdateParameter.withType(type);
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubResourceInner.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubResourceInner.java
new file mode 100644
index 000000000000..56e6884b207c
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubResourceInner.java
@@ -0,0 +1,174 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import org.joda.time.DateTime;
+import java.util.List;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EntityStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Single item in List or Get Event Hub operation.
+ */
+@JsonFlatten
+public class EventHubResourceInner extends ProxyResource {
+ /**
+ * Exact time the Event Hub was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdAt;
+
+ /**
+ * Number of days to retain the events for this Event Hub.
+ */
+ @JsonProperty(value = "properties.messageRetentionInDays")
+ private Long messageRetentionInDays;
+
+ /**
+ * Number of partitions created for the Event Hub.
+ */
+ @JsonProperty(value = "properties.partitionCount")
+ private Long partitionCount;
+
+ /**
+ * Current number of shards on the Event Hub.
+ */
+ @JsonProperty(value = "properties.partitionIds", access = JsonProperty.Access.WRITE_ONLY)
+ private List partitionIds;
+
+ /**
+ * Enumerates the possible values for the status of the Event Hub. Possible
+ * values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled',
+ * 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ */
+ @JsonProperty(value = "properties.status")
+ private EntityStatus status;
+
+ /**
+ * The exact time the message was updated.
+ */
+ @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime updatedAt;
+
+ /**
+ * Resource location.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Get exact time the Event Hub was created.
+ *
+ * @return the createdAt value
+ */
+ public DateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get number of days to retain the events for this Event Hub.
+ *
+ * @return the messageRetentionInDays value
+ */
+ public Long messageRetentionInDays() {
+ return this.messageRetentionInDays;
+ }
+
+ /**
+ * Set number of days to retain the events for this Event Hub.
+ *
+ * @param messageRetentionInDays the messageRetentionInDays value to set
+ * @return the EventHubResourceInner object itself.
+ */
+ public EventHubResourceInner withMessageRetentionInDays(Long messageRetentionInDays) {
+ this.messageRetentionInDays = messageRetentionInDays;
+ return this;
+ }
+
+ /**
+ * Get number of partitions created for the Event Hub.
+ *
+ * @return the partitionCount value
+ */
+ public Long partitionCount() {
+ return this.partitionCount;
+ }
+
+ /**
+ * Set number of partitions created for the Event Hub.
+ *
+ * @param partitionCount the partitionCount value to set
+ * @return the EventHubResourceInner object itself.
+ */
+ public EventHubResourceInner withPartitionCount(Long partitionCount) {
+ this.partitionCount = partitionCount;
+ return this;
+ }
+
+ /**
+ * Get current number of shards on the Event Hub.
+ *
+ * @return the partitionIds value
+ */
+ public List partitionIds() {
+ return this.partitionIds;
+ }
+
+ /**
+ * Get enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ *
+ * @return the status value
+ */
+ public EntityStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ *
+ * @param status the status value to set
+ * @return the EventHubResourceInner object itself.
+ */
+ public EventHubResourceInner withStatus(EntityStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the exact time the message was updated.
+ *
+ * @return the updatedAt value
+ */
+ public DateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get resource location.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set resource location.
+ *
+ * @param location the location value to set
+ * @return the EventHubResourceInner object itself.
+ */
+ public EventHubResourceInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubsImpl.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubsImpl.java
new file mode 100644
index 000000000000..4797b12ef1b4
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubsImpl.java
@@ -0,0 +1,178 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventHubs;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventHubResource;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventhubNamespaceSharedAccessAuthorizationRuleResource;
+import com.microsoft.azure.management.eventhub.v2015_08_01.NamespaceSharedAccessAuthorizationRuleResource;
+import com.microsoft.azure.management.eventhub.v2015_08_01.ResourceListKeys;
+
+class EventHubsImpl extends WrapperImpl implements EventHubs {
+ private final EventHubManager manager;
+
+ EventHubsImpl(EventHubManager manager) {
+ super(manager.inner().eventHubs());
+ this.manager = manager;
+ }
+
+ public EventHubManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public EventHubResourceImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private EventHubResourceImpl wrapModel(EventHubResourceInner inner) {
+ return new EventHubResourceImpl(inner, manager());
+ }
+
+ private EventHubResourceImpl wrapModel(String name) {
+ return new EventHubResourceImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listAllAsync(final String resourceGroupName, final String namespaceName) {
+ EventHubsInner client = this.inner();
+ return client.listAllAsync(resourceGroupName, namespaceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventHubResource call(EventHubResourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String namespaceName, String eventHubName) {
+ EventHubsInner client = this.inner();
+ return client.getAsync(resourceGroupName, namespaceName, eventHubName)
+ .map(new Func1() {
+ @Override
+ public EventHubResource call(EventHubResourceInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String namespaceName, String eventHubName) {
+ EventHubsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, namespaceName, eventHubName).toCompletable();
+ }
+
+ @Override
+ public EventhubNamespaceSharedAccessAuthorizationRuleResourceImpl defineAuthorizationRule(String name) {
+ return wrapAuthorizationRuleModel(name);
+ }
+
+ private EventhubNamespaceSharedAccessAuthorizationRuleResourceImpl wrapAuthorizationRuleModel(String name) {
+ return new EventhubNamespaceSharedAccessAuthorizationRuleResourceImpl(name, this.manager());
+ }
+
+ private EventhubNamespaceSharedAccessAuthorizationRuleResourceImpl wrapEventhubNamespaceSharedAccessAuthorizationRuleResourceModel(SharedAccessAuthorizationRuleResourceInner inner) {
+ return new EventhubNamespaceSharedAccessAuthorizationRuleResourceImpl(inner, manager());
+ }
+
+ private Observable getSharedAccessAuthorizationRuleResourceInnerUsingEventHubsInnerAsync(String id) {
+ String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
+ String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces");
+ String eventHubName = IdParsingUtils.getValueFromIdByName(id, "eventhubs");
+ String authorizationRuleName = IdParsingUtils.getValueFromIdByName(id, "authorizationRules");
+ EventHubsInner client = this.inner();
+ return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName);
+ }
+
+ @Override
+ public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) {
+ EventHubsInner client = this.inner();
+ return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public EventhubNamespaceSharedAccessAuthorizationRuleResource call(SharedAccessAuthorizationRuleResourceInner inner) {
+ return wrapEventhubNamespaceSharedAccessAuthorizationRuleResourceModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) {
+ EventHubsInner client = this.inner();
+ return client.listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public EventhubNamespaceSharedAccessAuthorizationRuleResource call(SharedAccessAuthorizationRuleResourceInner inner) {
+ return wrapEventhubNamespaceSharedAccessAuthorizationRuleResourceModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) {
+ EventHubsInner client = this.inner();
+ return client.deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toCompletable();
+ }
+
+ @Override
+ public Observable posttAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) {
+ EventHubsInner client = this.inner();
+ return client.posttAuthorizationRuleAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public NamespaceSharedAccessAuthorizationRuleResource call(SharedAccessAuthorizationRuleResourceInner inner) {
+ return new NamespaceSharedAccessAuthorizationRuleResourceImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) {
+ EventHubsInner client = this.inner();
+ return client.listKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public ResourceListKeys call(ResourceListKeysInner inner) {
+ return new ResourceListKeysImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) {
+ EventHubsInner client = this.inner();
+ return client.regenerateKeysAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public ResourceListKeys call(ResourceListKeysInner inner) {
+ return new ResourceListKeysImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubsInner.java b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubsInner.java
new file mode 100644
index 000000000000..59734e4b5763
--- /dev/null
+++ b/eventhub/resource-manager/v2015_08_01/src/main/java/com/microsoft/azure/management/eventhub/v2015_08_01/implementation/EventHubsInner.java
@@ -0,0 +1,1596 @@
+/**
+ * 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.eventhub.v2015_08_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.eventhub.v2015_08_01.EventHubCreateOrUpdateParameters;
+import com.microsoft.azure.management.eventhub.v2015_08_01.Policykey;
+import com.microsoft.azure.management.eventhub.v2015_08_01.RegenerateKeysParameters;
+import com.microsoft.azure.management.eventhub.v2015_08_01.SharedAccessAuthorizationRuleCreateOrUpdateParameters;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+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.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in EventHubs.
+ */
+public class EventHubsInner {
+ /** The Retrofit service to perform REST calls. */
+ private EventHubsService service;
+ /** The service client containing this operation class. */
+ private EventHubManagementClientImpl client;
+
+ /**
+ * Initializes an instance of EventHubsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public EventHubsInner(Retrofit retrofit, EventHubManagementClientImpl client) {
+ this.service = retrofit.create(EventHubsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EventHubs to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface EventHubsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.v2015_08_01.EventHubs listAll" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs")
+ Observable> listAll(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @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.eventhub.v2015_08_01.EventHubs createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Body EventHubCreateOrUpdateParameters parameters, @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.eventhub.v2015_08_01.EventHubs delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", method = "DELETE", hasBody = true)
+ Observable