diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/pom.xml b/sdk/servicebus/mgmt-v2018_01_01_preview/pom.xml
index 7a91f1dbfb1e..68c64ab067a8 100644
--- a/sdk/servicebus/mgmt-v2018_01_01_preview/pom.xml
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
azure-mgmt-servicebus
1.0.0-beta
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/AccessKeys.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/AccessKeys.java
new file mode 100644
index 000000000000..522020b0a042
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/AccessKeys.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.AccessKeysInner;
+
+/**
+ * Type representing AccessKeys.
+ */
+public interface AccessKeys extends HasInner, HasManager {
+ /**
+ * @return the aliasPrimaryConnectionString value.
+ */
+ String aliasPrimaryConnectionString();
+
+ /**
+ * @return the aliasSecondaryConnectionString value.
+ */
+ String aliasSecondaryConnectionString();
+
+ /**
+ * @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/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/AccessRights.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/AccessRights.java
new file mode 100644
index 000000000000..ea197c3275f4
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/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.servicebus.v2018_01_01_preview;
+
+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/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Action.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Action.java
new file mode 100644
index 000000000000..23503cf3cc49
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Action.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Represents the filter actions which are allowed for the transformation of a
+ * message that have been matched by a filter expression.
+ */
+public class Action {
+ /**
+ * SQL expression. e.g. MyProperty='ABC'.
+ */
+ @JsonProperty(value = "sqlExpression")
+ private String sqlExpression;
+
+ /**
+ * This property is reserved for future use. An integer value showing the
+ * compatibility level, currently hard-coded to 20.
+ */
+ @JsonProperty(value = "compatibilityLevel")
+ private Integer compatibilityLevel;
+
+ /**
+ * Value that indicates whether the rule action requires preprocessing.
+ */
+ @JsonProperty(value = "requiresPreprocessing")
+ private Boolean requiresPreprocessing;
+
+ /**
+ * Get sQL expression. e.g. MyProperty='ABC'.
+ *
+ * @return the sqlExpression value
+ */
+ public String sqlExpression() {
+ return this.sqlExpression;
+ }
+
+ /**
+ * Set sQL expression. e.g. MyProperty='ABC'.
+ *
+ * @param sqlExpression the sqlExpression value to set
+ * @return the Action object itself.
+ */
+ public Action withSqlExpression(String sqlExpression) {
+ this.sqlExpression = sqlExpression;
+ return this;
+ }
+
+ /**
+ * Get this property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
+ *
+ * @return the compatibilityLevel value
+ */
+ public Integer compatibilityLevel() {
+ return this.compatibilityLevel;
+ }
+
+ /**
+ * Set this property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
+ *
+ * @param compatibilityLevel the compatibilityLevel value to set
+ * @return the Action object itself.
+ */
+ public Action withCompatibilityLevel(Integer compatibilityLevel) {
+ this.compatibilityLevel = compatibilityLevel;
+ return this;
+ }
+
+ /**
+ * Get value that indicates whether the rule action requires preprocessing.
+ *
+ * @return the requiresPreprocessing value
+ */
+ public Boolean requiresPreprocessing() {
+ return this.requiresPreprocessing;
+ }
+
+ /**
+ * Set value that indicates whether the rule action requires preprocessing.
+ *
+ * @param requiresPreprocessing the requiresPreprocessing value to set
+ * @return the Action object itself.
+ */
+ public Action withRequiresPreprocessing(Boolean requiresPreprocessing) {
+ this.requiresPreprocessing = requiresPreprocessing;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ArmDisasterRecovery.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ArmDisasterRecovery.java
new file mode 100644
index 000000000000..0bdb81875540
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ArmDisasterRecovery.java
@@ -0,0 +1,161 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ArmDisasterRecoveryInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+
+/**
+ * Type representing ArmDisasterRecovery.
+ */
+public interface ArmDisasterRecovery extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the alternateName value.
+ */
+ String alternateName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the partnerNamespace value.
+ */
+ String partnerNamespace();
+
+ /**
+ * @return the pendingReplicationOperationsCount value.
+ */
+ Long pendingReplicationOperationsCount();
+
+ /**
+ * @return the provisioningState value.
+ */
+ ProvisioningStateDR provisioningState();
+
+ /**
+ * @return the role value.
+ */
+ RoleDisasterRecovery role();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the ArmDisasterRecovery definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ArmDisasterRecovery definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ArmDisasterRecovery definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the armdisasterrecovery definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @return the next definition stage
+ */
+ WithCreate withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the armdisasterrecovery definition allowing to specify AlternateName.
+ */
+ interface WithAlternateName {
+ /**
+ * Specifies alternateName.
+ * @param alternateName Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
+ * @return the next definition stage
+ */
+ WithCreate withAlternateName(String alternateName);
+ }
+
+ /**
+ * The stage of the armdisasterrecovery definition allowing to specify PartnerNamespace.
+ */
+ interface WithPartnerNamespace {
+ /**
+ * Specifies partnerNamespace.
+ * @param partnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
+ * @return the next definition stage
+ */
+ WithCreate withPartnerNamespace(String partnerNamespace);
+ }
+
+ /**
+ * 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.WithAlternateName, DefinitionStages.WithPartnerNamespace {
+ }
+ }
+ /**
+ * The template for a ArmDisasterRecovery update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAlternateName, UpdateStages.WithPartnerNamespace {
+ }
+
+ /**
+ * Grouping of ArmDisasterRecovery update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the armdisasterrecovery update allowing to specify AlternateName.
+ */
+ interface WithAlternateName {
+ /**
+ * Specifies alternateName.
+ * @param alternateName Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
+ * @return the next update stage
+ */
+ Update withAlternateName(String alternateName);
+ }
+
+ /**
+ * The stage of the armdisasterrecovery update allowing to specify PartnerNamespace.
+ */
+ interface WithPartnerNamespace {
+ /**
+ * Specifies partnerNamespace.
+ * @param partnerNamespace ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
+ * @return the next update stage
+ */
+ Update withPartnerNamespace(String partnerNamespace);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CaptureDescription.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CaptureDescription.java
new file mode 100644
index 000000000000..6d9a152850aa
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CaptureDescription.java
@@ -0,0 +1,152 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties to configure capture description for eventhub.
+ */
+public class CaptureDescription {
+ /**
+ * A value that indicates whether capture description is enabled.
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /**
+ * Enumerates the possible values for the encoding format of capture
+ * description. Possible values include: 'Avro', 'AvroDeflate'.
+ */
+ @JsonProperty(value = "encoding")
+ private EncodingCaptureDescription encoding;
+
+ /**
+ * The time window allows you to set the frequency with which the capture
+ * to Azure Blobs will happen, value should between 60 to 900 seconds.
+ */
+ @JsonProperty(value = "intervalInSeconds")
+ private Integer intervalInSeconds;
+
+ /**
+ * The size window defines the amount of data built up in your Event Hub
+ * before an capture operation, value should be between 10485760 and
+ * 524288000 bytes.
+ */
+ @JsonProperty(value = "sizeLimitInBytes")
+ private Integer sizeLimitInBytes;
+
+ /**
+ * Properties of Destination where capture will be stored. (Storage
+ * Account, Blob Names).
+ */
+ @JsonProperty(value = "destination")
+ private Destination destination;
+
+ /**
+ * Get a value that indicates whether capture description is enabled.
+ *
+ * @return the enabled value
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set a value that indicates whether capture description is enabled.
+ *
+ * @param enabled the enabled value to set
+ * @return the CaptureDescription object itself.
+ */
+ public CaptureDescription withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get enumerates the possible values for the encoding format of capture description. Possible values include: 'Avro', 'AvroDeflate'.
+ *
+ * @return the encoding value
+ */
+ public EncodingCaptureDescription encoding() {
+ return this.encoding;
+ }
+
+ /**
+ * Set enumerates the possible values for the encoding format of capture description. Possible values include: 'Avro', 'AvroDeflate'.
+ *
+ * @param encoding the encoding value to set
+ * @return the CaptureDescription object itself.
+ */
+ public CaptureDescription withEncoding(EncodingCaptureDescription encoding) {
+ this.encoding = encoding;
+ return this;
+ }
+
+ /**
+ * Get the time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds.
+ *
+ * @return the intervalInSeconds value
+ */
+ public Integer intervalInSeconds() {
+ return this.intervalInSeconds;
+ }
+
+ /**
+ * Set the time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds.
+ *
+ * @param intervalInSeconds the intervalInSeconds value to set
+ * @return the CaptureDescription object itself.
+ */
+ public CaptureDescription withIntervalInSeconds(Integer intervalInSeconds) {
+ this.intervalInSeconds = intervalInSeconds;
+ return this;
+ }
+
+ /**
+ * Get the size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 and 524288000 bytes.
+ *
+ * @return the sizeLimitInBytes value
+ */
+ public Integer sizeLimitInBytes() {
+ return this.sizeLimitInBytes;
+ }
+
+ /**
+ * Set the size window defines the amount of data built up in your Event Hub before an capture operation, value should be between 10485760 and 524288000 bytes.
+ *
+ * @param sizeLimitInBytes the sizeLimitInBytes value to set
+ * @return the CaptureDescription object itself.
+ */
+ public CaptureDescription withSizeLimitInBytes(Integer sizeLimitInBytes) {
+ this.sizeLimitInBytes = sizeLimitInBytes;
+ return this;
+ }
+
+ /**
+ * Get properties of Destination where capture will be stored. (Storage Account, Blob Names).
+ *
+ * @return the destination value
+ */
+ public Destination destination() {
+ return this.destination;
+ }
+
+ /**
+ * Set properties of Destination where capture will be stored. (Storage Account, Blob Names).
+ *
+ * @param destination the destination value to set
+ * @return the CaptureDescription object itself.
+ */
+ public CaptureDescription withDestination(Destination destination) {
+ this.destination = destination;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CheckNameAvailability.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CheckNameAvailability.java
new file mode 100644
index 000000000000..ee03c2d3e3ab
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CheckNameAvailability.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Description of a Check Name availability request properties.
+ */
+public class CheckNameAvailability {
+ /**
+ * The Name to check the namespace name availability and The namespace name
+ * can contain only letters, numbers, and hyphens. The namespace must start
+ * with a letter, and it must end with a letter or number.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * Get the Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ *
+ * @param name the name value to set
+ * @return the CheckNameAvailability object itself.
+ */
+ public CheckNameAvailability withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CheckNameAvailabilityResult.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CheckNameAvailabilityResult.java
new file mode 100644
index 000000000000..5e35da63f12e
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.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/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ConnectionState.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ConnectionState.java
new file mode 100644
index 000000000000..efdc68319d69
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ConnectionState.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * ConnectionState information.
+ */
+public class ConnectionState {
+ /**
+ * Status of the connection. Possible values include: 'Pending',
+ * 'Approved', 'Rejected', 'Disconnected'.
+ */
+ @JsonProperty(value = "status")
+ private PrivateLinkConnectionStatus status;
+
+ /**
+ * Description of the connection state.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * Get status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @return the status value
+ */
+ public PrivateLinkConnectionStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set status of the connection. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @param status the status value to set
+ * @return the ConnectionState object itself.
+ */
+ public ConnectionState withStatus(PrivateLinkConnectionStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get description of the connection state.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set description of the connection state.
+ *
+ * @param description the description value to set
+ * @return the ConnectionState object itself.
+ */
+ public ConnectionState withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CorrelationFilter.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CorrelationFilter.java
new file mode 100644
index 000000000000..2d86e254540e
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/CorrelationFilter.java
@@ -0,0 +1,278 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Represents the correlation filter expression.
+ */
+public class CorrelationFilter {
+ /**
+ * dictionary object for custom filters.
+ */
+ @JsonProperty(value = "properties")
+ private Map properties;
+
+ /**
+ * Identifier of the correlation.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /**
+ * Identifier of the message.
+ */
+ @JsonProperty(value = "messageId")
+ private String messageId;
+
+ /**
+ * Address to send to.
+ */
+ @JsonProperty(value = "to")
+ private String to;
+
+ /**
+ * Address of the queue to reply to.
+ */
+ @JsonProperty(value = "replyTo")
+ private String replyTo;
+
+ /**
+ * Application specific label.
+ */
+ @JsonProperty(value = "label")
+ private String label;
+
+ /**
+ * Session identifier.
+ */
+ @JsonProperty(value = "sessionId")
+ private String sessionId;
+
+ /**
+ * Session identifier to reply to.
+ */
+ @JsonProperty(value = "replyToSessionId")
+ private String replyToSessionId;
+
+ /**
+ * Content type of the message.
+ */
+ @JsonProperty(value = "contentType")
+ private String contentType;
+
+ /**
+ * Value that indicates whether the rule action requires preprocessing.
+ */
+ @JsonProperty(value = "requiresPreprocessing")
+ private Boolean requiresPreprocessing;
+
+ /**
+ * Get dictionary object for custom filters.
+ *
+ * @return the properties value
+ */
+ public Map properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set dictionary object for custom filters.
+ *
+ * @param properties the properties value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withProperties(Map properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get identifier of the correlation.
+ *
+ * @return the correlationId value
+ */
+ public String correlationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set identifier of the correlation.
+ *
+ * @param correlationId the correlationId value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get identifier of the message.
+ *
+ * @return the messageId value
+ */
+ public String messageId() {
+ return this.messageId;
+ }
+
+ /**
+ * Set identifier of the message.
+ *
+ * @param messageId the messageId value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withMessageId(String messageId) {
+ this.messageId = messageId;
+ return this;
+ }
+
+ /**
+ * Get address to send to.
+ *
+ * @return the to value
+ */
+ public String to() {
+ return this.to;
+ }
+
+ /**
+ * Set address to send to.
+ *
+ * @param to the to value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withTo(String to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * Get address of the queue to reply to.
+ *
+ * @return the replyTo value
+ */
+ public String replyTo() {
+ return this.replyTo;
+ }
+
+ /**
+ * Set address of the queue to reply to.
+ *
+ * @param replyTo the replyTo value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withReplyTo(String replyTo) {
+ this.replyTo = replyTo;
+ return this;
+ }
+
+ /**
+ * Get application specific label.
+ *
+ * @return the label value
+ */
+ public String label() {
+ return this.label;
+ }
+
+ /**
+ * Set application specific label.
+ *
+ * @param label the label value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withLabel(String label) {
+ this.label = label;
+ return this;
+ }
+
+ /**
+ * Get session identifier.
+ *
+ * @return the sessionId value
+ */
+ public String sessionId() {
+ return this.sessionId;
+ }
+
+ /**
+ * Set session identifier.
+ *
+ * @param sessionId the sessionId value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withSessionId(String sessionId) {
+ this.sessionId = sessionId;
+ return this;
+ }
+
+ /**
+ * Get session identifier to reply to.
+ *
+ * @return the replyToSessionId value
+ */
+ public String replyToSessionId() {
+ return this.replyToSessionId;
+ }
+
+ /**
+ * Set session identifier to reply to.
+ *
+ * @param replyToSessionId the replyToSessionId value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withReplyToSessionId(String replyToSessionId) {
+ this.replyToSessionId = replyToSessionId;
+ return this;
+ }
+
+ /**
+ * Get content type of the message.
+ *
+ * @return the contentType value
+ */
+ public String contentType() {
+ return this.contentType;
+ }
+
+ /**
+ * Set content type of the message.
+ *
+ * @param contentType the contentType value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withContentType(String contentType) {
+ this.contentType = contentType;
+ return this;
+ }
+
+ /**
+ * Get value that indicates whether the rule action requires preprocessing.
+ *
+ * @return the requiresPreprocessing value
+ */
+ public Boolean requiresPreprocessing() {
+ return this.requiresPreprocessing;
+ }
+
+ /**
+ * Set value that indicates whether the rule action requires preprocessing.
+ *
+ * @param requiresPreprocessing the requiresPreprocessing value to set
+ * @return the CorrelationFilter object itself.
+ */
+ public CorrelationFilter withRequiresPreprocessing(Boolean requiresPreprocessing) {
+ this.requiresPreprocessing = requiresPreprocessing;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Destination.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Destination.java
new file mode 100644
index 000000000000..ceffc7a5f2f4
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Destination.java
@@ -0,0 +1,126 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * Capture storage details for capture description.
+ */
+@JsonFlatten
+public class Destination {
+ /**
+ * Name for capture destination.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Resource id of the storage account to be used to create the blobs.
+ */
+ @JsonProperty(value = "properties.storageAccountResourceId")
+ private String storageAccountResourceId;
+
+ /**
+ * Blob container Name.
+ */
+ @JsonProperty(value = "properties.blobContainer")
+ private String blobContainer;
+
+ /**
+ * Blob naming convention for archive, e.g.
+ * {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}.
+ * Here all the parameters (Namespace,EventHub .. etc) are mandatory
+ * irrespective of order.
+ */
+ @JsonProperty(value = "properties.archiveNameFormat")
+ private String archiveNameFormat;
+
+ /**
+ * Get name for capture destination.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name for capture destination.
+ *
+ * @param name the name value to set
+ * @return the Destination object itself.
+ */
+ public Destination withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get resource id of the storage account to be used to create the blobs.
+ *
+ * @return the storageAccountResourceId value
+ */
+ public String storageAccountResourceId() {
+ return this.storageAccountResourceId;
+ }
+
+ /**
+ * Set resource id of the storage account to be used to create the blobs.
+ *
+ * @param storageAccountResourceId the storageAccountResourceId value to set
+ * @return the Destination object itself.
+ */
+ public Destination withStorageAccountResourceId(String storageAccountResourceId) {
+ this.storageAccountResourceId = storageAccountResourceId;
+ return this;
+ }
+
+ /**
+ * Get blob container Name.
+ *
+ * @return the blobContainer value
+ */
+ public String blobContainer() {
+ return this.blobContainer;
+ }
+
+ /**
+ * Set blob container Name.
+ *
+ * @param blobContainer the blobContainer value to set
+ * @return the Destination object itself.
+ */
+ public Destination withBlobContainer(String blobContainer) {
+ this.blobContainer = blobContainer;
+ return this;
+ }
+
+ /**
+ * Get blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order.
+ *
+ * @return the archiveNameFormat value
+ */
+ public String archiveNameFormat() {
+ return this.archiveNameFormat;
+ }
+
+ /**
+ * Set blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order.
+ *
+ * @param archiveNameFormat the archiveNameFormat value to set
+ * @return the Destination object itself.
+ */
+ public Destination withArchiveNameFormat(String archiveNameFormat) {
+ this.archiveNameFormat = archiveNameFormat;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/DisasterRecoveryConfigNamespaceSBAuthorizationRule.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/DisasterRecoveryConfigNamespaceSBAuthorizationRule.java
new file mode 100644
index 000000000000..b6dbe55b43e3
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/DisasterRecoveryConfigNamespaceSBAuthorizationRule.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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBAuthorizationRuleInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import java.util.List;
+
+/**
+ * Type representing DisasterRecoveryConfigNamespaceSBAuthorizationRule.
+ */
+public interface DisasterRecoveryConfigNamespaceSBAuthorizationRule extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rights value.
+ */
+ List rights();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/DisasterRecoveryConfigs.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/DisasterRecoveryConfigs.java
new file mode 100644
index 000000000000..44aac1e67d5a
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/DisasterRecoveryConfigs.java
@@ -0,0 +1,122 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.DisasterRecoveryConfigsInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.DisasterRecoveryConfigNamespaceSBAuthorizationRule;
+
+/**
+ * Type representing DisasterRecoveryConfigs.
+ */
+public interface DisasterRecoveryConfigs extends SupportsCreating, HasInner {
+ /**
+ * Check the give namespace name availability.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable checkNameAvailabilityMethodAsync(String resourceGroupName, String namespaceName, String name);
+
+ /**
+ * This operation disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable breakPairingAsync(String resourceGroupName, String namespaceName, String alias);
+
+ /**
+ * Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable failOverAsync(String resourceGroupName, String namespaceName, String alias);
+
+ /**
+ * Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String alias);
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations).
+ *
+ * @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 listAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes an Alias(Disaster Recovery configuration).
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param alias The Disaster Recovery configuration name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String alias);
+
+ /**
+ * Gets an authorization rule for a namespace by rule name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param alias The Disaster Recovery configuration 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 alias, String authorizationRuleName);
+
+ /**
+ * Gets the authorization rules for a namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param alias The Disaster Recovery configuration 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 alias);
+
+ /**
+ * 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 alias The Disaster Recovery configuration 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 alias, String authorizationRuleName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EncodingCaptureDescription.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EncodingCaptureDescription.java
new file mode 100644
index 000000000000..70a07e934a10
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EncodingCaptureDescription.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for EncodingCaptureDescription.
+ */
+public enum EncodingCaptureDescription {
+ /** Enum value Avro. */
+ AVRO("Avro"),
+
+ /** Enum value AvroDeflate. */
+ AVRO_DEFLATE("AvroDeflate");
+
+ /** The actual serialized value for a EncodingCaptureDescription instance. */
+ private String value;
+
+ EncodingCaptureDescription(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a EncodingCaptureDescription instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed EncodingCaptureDescription object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static EncodingCaptureDescription fromString(String value) {
+ EncodingCaptureDescription[] items = EncodingCaptureDescription.values();
+ for (EncodingCaptureDescription item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Encryption.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Encryption.java
new file mode 100644
index 000000000000..afa679125297
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Encryption.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties to configure Encryption.
+ */
+public class Encryption {
+ /**
+ * Properties of KeyVault.
+ */
+ @JsonProperty(value = "keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /**
+ * Enumerates the possible value of keySource for Encryption. Possible
+ * values include: 'Microsoft.KeyVault'.
+ */
+ @JsonProperty(value = "keySource")
+ private KeySource keySource;
+
+ /**
+ * Get properties of KeyVault.
+ *
+ * @return the keyVaultProperties value
+ */
+ public KeyVaultProperties keyVaultProperties() {
+ return this.keyVaultProperties;
+ }
+
+ /**
+ * Set properties of KeyVault.
+ *
+ * @param keyVaultProperties the keyVaultProperties value to set
+ * @return the Encryption object itself.
+ */
+ public Encryption withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+ /**
+ * Get enumerates the possible value of keySource for Encryption. Possible values include: 'Microsoft.KeyVault'.
+ *
+ * @return the keySource value
+ */
+ public KeySource keySource() {
+ return this.keySource;
+ }
+
+ /**
+ * Set enumerates the possible value of keySource for Encryption. Possible values include: 'Microsoft.KeyVault'.
+ *
+ * @param keySource the keySource value to set
+ * @return the Encryption object itself.
+ */
+ public Encryption withKeySource(KeySource keySource) {
+ this.keySource = keySource;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EndPointProvisioningState.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EndPointProvisioningState.java
new file mode 100644
index 000000000000..131b6cdf51d5
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EndPointProvisioningState.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.servicebus.v2018_01_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for EndPointProvisioningState.
+ */
+public final class EndPointProvisioningState extends ExpandableStringEnum {
+ /** Static value Creating for EndPointProvisioningState. */
+ public static final EndPointProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Updating for EndPointProvisioningState. */
+ public static final EndPointProvisioningState UPDATING = fromString("Updating");
+
+ /** Static value Deleting for EndPointProvisioningState. */
+ public static final EndPointProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Succeeded for EndPointProvisioningState. */
+ public static final EndPointProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Canceled for EndPointProvisioningState. */
+ public static final EndPointProvisioningState CANCELED = fromString("Canceled");
+
+ /** Static value Failed for EndPointProvisioningState. */
+ public static final EndPointProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates or finds a EndPointProvisioningState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding EndPointProvisioningState
+ */
+ @JsonCreator
+ public static EndPointProvisioningState fromString(String name) {
+ return fromString(name, EndPointProvisioningState.class);
+ }
+
+ /**
+ * @return known EndPointProvisioningState values
+ */
+ public static Collection values() {
+ return values(EndPointProvisioningState.class);
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EntityStatus.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EntityStatus.java
new file mode 100644
index 000000000000..cd644fc84bd2
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/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.servicebus.v2018_01_01_preview;
+
+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/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorAdditionalInfo.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorAdditionalInfo.java
new file mode 100644
index 000000000000..a11eda407e67
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorAdditionalInfo.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The resource management error additional info.
+ */
+public class ErrorAdditionalInfo {
+ /**
+ * The additional info type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * The additional info.
+ */
+ @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY)
+ private Object info;
+
+ /**
+ * Get the additional info type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the additional info.
+ *
+ * @return the info value
+ */
+ public Object info() {
+ return this.info;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponse.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponse.java
index b368e81e0d1c..a754f4364205 100644
--- a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponse.java
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponse.java
@@ -11,59 +11,32 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Error response indicates ServiceBus service is not able to process the
- * incoming request. The reason is provided in the error message.
+ * The resource management error response.
*/
public class ErrorResponse {
/**
- * Error code.
+ * The error object.
*/
- @JsonProperty(value = "code")
- private String code;
+ @JsonProperty(value = "error")
+ private ErrorResponseError error;
/**
- * Error message indicating why the operation failed.
- */
- @JsonProperty(value = "message")
- private String message;
-
- /**
- * Get error code.
- *
- * @return the code value
- */
- public String code() {
- return this.code;
- }
-
- /**
- * Set error code.
- *
- * @param code the code value to set
- * @return the ErrorResponse object itself.
- */
- public ErrorResponse withCode(String code) {
- this.code = code;
- return this;
- }
-
- /**
- * Get error message indicating why the operation failed.
+ * Get the error object.
*
- * @return the message value
+ * @return the error value
*/
- public String message() {
- return this.message;
+ public ErrorResponseError error() {
+ return this.error;
}
/**
- * Set error message indicating why the operation failed.
+ * Set the error object.
*
- * @param message the message value to set
+ * @param error the error value to set
* @return the ErrorResponse object itself.
*/
- public ErrorResponse withMessage(String message) {
- this.message = message;
+ public ErrorResponse withError(ErrorResponseError error) {
+ this.error = error;
return this;
}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponseError.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponseError.java
new file mode 100644
index 000000000000..e346a8265fa7
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ErrorResponseError.java
@@ -0,0 +1,93 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The error object.
+ */
+public class ErrorResponseError {
+ /**
+ * The error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * The error message.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The error target.
+ */
+ @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
+ private String target;
+
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private List details;
+
+ /**
+ * The error additional info.
+ */
+ @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
+ private List additionalInfo;
+
+ /**
+ * Get the error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get the error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the error target.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Get the error details.
+ *
+ * @return the details value
+ */
+ public List details() {
+ return this.details;
+ }
+
+ /**
+ * Get the error additional info.
+ *
+ * @return the additionalInfo value
+ */
+ public List additionalInfo() {
+ return this.additionalInfo;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EventHubs.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EventHubs.java
new file mode 100644
index 000000000000..e4a3d36c9651
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/EventHubs.java
@@ -0,0 +1,29 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.EventHubsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing EventHubs.
+ */
+public interface EventHubs extends HasInner {
+ /**
+ * Gets all the Event Hubs in a service bus 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 listByNamespaceAsync(final String resourceGroupName, final String namespaceName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Eventhub.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Eventhub.java
new file mode 100644
index 000000000000..5a76fd732906
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Eventhub.java
@@ -0,0 +1,72 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.EventhubInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import org.joda.time.DateTime;
+import java.util.List;
+
+/**
+ * Type representing Eventhub.
+ */
+public interface Eventhub extends HasInner, HasManager {
+ /**
+ * @return the captureDescription value.
+ */
+ CaptureDescription captureDescription();
+
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @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();
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/FilterType.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/FilterType.java
new file mode 100644
index 000000000000..1ab5417f0028
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/FilterType.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for FilterType.
+ */
+public enum FilterType {
+ /** Enum value SqlFilter. */
+ SQL_FILTER("SqlFilter"),
+
+ /** Enum value CorrelationFilter. */
+ CORRELATION_FILTER("CorrelationFilter");
+
+ /** The actual serialized value for a FilterType instance. */
+ private String value;
+
+ FilterType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a FilterType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed FilterType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static FilterType fromString(String value) {
+ FilterType[] items = FilterType.values();
+ for (FilterType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Identity.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Identity.java
new file mode 100644
index 000000000000..cda8a23e29ca
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Identity.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties to configure Identity for Bring your Own Keys.
+ */
+public class Identity {
+ /**
+ * ObjectId from the KeyVault.
+ */
+ @JsonProperty(value = "principalId")
+ private String principalId;
+
+ /**
+ * TenantId from the KeyVault.
+ */
+ @JsonProperty(value = "tenantId")
+ private String tenantId;
+
+ /**
+ * Enumerates the possible value Identity type, which currently supports
+ * only 'SystemAssigned'. Possible values include: 'SystemAssigned'.
+ */
+ @JsonProperty(value = "type")
+ private IdentityType type;
+
+ /**
+ * Get objectId from the KeyVault.
+ *
+ * @return the principalId value
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Set objectId from the KeyVault.
+ *
+ * @param principalId the principalId value to set
+ * @return the Identity object itself.
+ */
+ public Identity withPrincipalId(String principalId) {
+ this.principalId = principalId;
+ return this;
+ }
+
+ /**
+ * Get tenantId from the KeyVault.
+ *
+ * @return the tenantId value
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Set tenantId from the KeyVault.
+ *
+ * @param tenantId the tenantId value to set
+ * @return the Identity object itself.
+ */
+ public Identity withTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get enumerates the possible value Identity type, which currently supports only 'SystemAssigned'. Possible values include: 'SystemAssigned'.
+ *
+ * @return the type value
+ */
+ public IdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set enumerates the possible value Identity type, which currently supports only 'SystemAssigned'. Possible values include: 'SystemAssigned'.
+ *
+ * @param type the type value to set
+ * @return the Identity object itself.
+ */
+ public Identity withType(IdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/IdentityType.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/IdentityType.java
new file mode 100644
index 000000000000..c43e3c89ffc1
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/IdentityType.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for IdentityType.
+ */
+public enum IdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned");
+
+ /** The actual serialized value for a IdentityType instance. */
+ private String value;
+
+ IdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a IdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed IdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static IdentityType fromString(String value) {
+ IdentityType[] items = IdentityType.values();
+ for (IdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeySource.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeySource.java
new file mode 100644
index 000000000000..a24de174ccc8
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeySource.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for KeySource.
+ */
+public enum KeySource {
+ /** Enum value Microsoft.KeyVault. */
+ MICROSOFT_KEY_VAULT("Microsoft.KeyVault");
+
+ /** The actual serialized value for a KeySource instance. */
+ private String value;
+
+ KeySource(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a KeySource instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed KeySource object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static KeySource fromString(String value) {
+ KeySource[] items = KeySource.values();
+ for (KeySource item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeyType.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeyType.java
new file mode 100644
index 000000000000..77ce99c5b63c
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeyType.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for KeyType.
+ */
+public enum KeyType {
+ /** Enum value PrimaryKey. */
+ PRIMARY_KEY("PrimaryKey"),
+
+ /** Enum value SecondaryKey. */
+ SECONDARY_KEY("SecondaryKey");
+
+ /** The actual serialized value for a KeyType instance. */
+ private String value;
+
+ KeyType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a KeyType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed KeyType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static KeyType fromString(String value) {
+ KeyType[] items = KeyType.values();
+ for (KeyType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeyVaultProperties.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeyVaultProperties.java
new file mode 100644
index 000000000000..0f85cc59ad88
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/KeyVaultProperties.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties to configure keyVault Properties.
+ */
+public class KeyVaultProperties {
+ /**
+ * Name of the Key from KeyVault.
+ */
+ @JsonProperty(value = "keyName")
+ private String keyName;
+
+ /**
+ * Uri of KeyVault.
+ */
+ @JsonProperty(value = "keyVaultUri")
+ private String keyVaultUri;
+
+ /**
+ * Get name of the Key from KeyVault.
+ *
+ * @return the keyName value
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set name of the Key from KeyVault.
+ *
+ * @param keyName the keyName value to set
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+ /**
+ * Get uri of KeyVault.
+ *
+ * @return the keyVaultUri value
+ */
+ public String keyVaultUri() {
+ return this.keyVaultUri;
+ }
+
+ /**
+ * Set uri of KeyVault.
+ *
+ * @param keyVaultUri the keyVaultUri value to set
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyVaultUri(String keyVaultUri) {
+ this.keyVaultUri = keyVaultUri;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MessageCountDetails.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MessageCountDetails.java
new file mode 100644
index 000000000000..49d235a86c8d
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MessageCountDetails.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Message Count Details.
+ */
+public class MessageCountDetails {
+ /**
+ * Number of active messages in the queue, topic, or subscription.
+ */
+ @JsonProperty(value = "activeMessageCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long activeMessageCount;
+
+ /**
+ * Number of messages that are dead lettered.
+ */
+ @JsonProperty(value = "deadLetterMessageCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long deadLetterMessageCount;
+
+ /**
+ * Number of scheduled messages.
+ */
+ @JsonProperty(value = "scheduledMessageCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long scheduledMessageCount;
+
+ /**
+ * Number of messages transferred to another queue, topic, or subscription.
+ */
+ @JsonProperty(value = "transferMessageCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long transferMessageCount;
+
+ /**
+ * Number of messages transferred into dead letters.
+ */
+ @JsonProperty(value = "transferDeadLetterMessageCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long transferDeadLetterMessageCount;
+
+ /**
+ * Get number of active messages in the queue, topic, or subscription.
+ *
+ * @return the activeMessageCount value
+ */
+ public Long activeMessageCount() {
+ return this.activeMessageCount;
+ }
+
+ /**
+ * Get number of messages that are dead lettered.
+ *
+ * @return the deadLetterMessageCount value
+ */
+ public Long deadLetterMessageCount() {
+ return this.deadLetterMessageCount;
+ }
+
+ /**
+ * Get number of scheduled messages.
+ *
+ * @return the scheduledMessageCount value
+ */
+ public Long scheduledMessageCount() {
+ return this.scheduledMessageCount;
+ }
+
+ /**
+ * Get number of messages transferred to another queue, topic, or subscription.
+ *
+ * @return the transferMessageCount value
+ */
+ public Long transferMessageCount() {
+ return this.transferMessageCount;
+ }
+
+ /**
+ * Get number of messages transferred into dead letters.
+ *
+ * @return the transferDeadLetterMessageCount value
+ */
+ public Long transferDeadLetterMessageCount() {
+ return this.transferDeadLetterMessageCount;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MigrationConfigProperties.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MigrationConfigProperties.java
new file mode 100644
index 000000000000..9daf777ff9f8
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MigrationConfigProperties.java
@@ -0,0 +1,137 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.MigrationConfigPropertiesInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+
+/**
+ * Type representing MigrationConfigProperties.
+ */
+public interface MigrationConfigProperties extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the migrationState value.
+ */
+ String migrationState();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the pendingReplicationOperationsCount value.
+ */
+ Long pendingReplicationOperationsCount();
+
+ /**
+ * @return the postMigrationName value.
+ */
+ String postMigrationName();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the targetNamespace value.
+ */
+ String targetNamespace();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the MigrationConfigProperties definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithPostMigrationName, DefinitionStages.WithTargetNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of MigrationConfigProperties definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a MigrationConfigProperties definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the migrationconfigproperties definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @return the next definition stage
+ */
+ WithPostMigrationName withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the migrationconfigproperties definition allowing to specify PostMigrationName.
+ */
+ interface WithPostMigrationName {
+ /**
+ * Specifies postMigrationName.
+ * @param postMigrationName Name to access Standard Namespace after migration
+ * @return the next definition stage
+ */
+ WithTargetNamespace withPostMigrationName(String postMigrationName);
+ }
+
+ /**
+ * The stage of the migrationconfigproperties definition allowing to specify TargetNamespace.
+ */
+ interface WithTargetNamespace {
+ /**
+ * Specifies targetNamespace.
+ * @param targetNamespace Existing premium Namespace ARM Id name which has no entities, will be used for migration
+ * @return the next definition stage
+ */
+ WithCreate withTargetNamespace(String targetNamespace);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a MigrationConfigProperties update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable {
+ }
+
+ /**
+ * Grouping of MigrationConfigProperties update stages.
+ */
+ interface UpdateStages {
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MigrationConfigs.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MigrationConfigs.java
new file mode 100644
index 000000000000..c3323a6655b6
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/MigrationConfigs.java
@@ -0,0 +1,71 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.MigrationConfigsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing MigrationConfigs.
+ */
+public interface MigrationConfigs extends SupportsCreating, HasInner {
+ /**
+ * This operation Completes Migration of entities by pointing the connection strings to Premium namespace and any entities created after the operation will be under Premium Namespace. CompleteMigration operation will fail when entity migration is in-progress.
+ *
+ * @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
+ */
+ Completable completeMigrationAsync(String resourceGroupName, String namespaceName);
+
+ /**
+ * This operation reverts Migration.
+ *
+ * @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
+ */
+ Completable revertAsync(String resourceGroupName, String namespaceName);
+
+ /**
+ * Retrieves Migration Config.
+ *
+ * @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 getAsync(String resourceGroupName, String namespaceName);
+
+ /**
+ * Gets all migrationConfigurations.
+ *
+ * @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 listAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes a MigrationConfiguration.
+ *
+ * @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
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NameSpaceType.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NameSpaceType.java
new file mode 100644
index 000000000000..e84d86f7b5e5
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NameSpaceType.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for NameSpaceType.
+ */
+public enum NameSpaceType {
+ /** Enum value Messaging. */
+ MESSAGING("Messaging"),
+
+ /** Enum value NotificationHub. */
+ NOTIFICATION_HUB("NotificationHub"),
+
+ /** Enum value Mixed. */
+ MIXED("Mixed"),
+
+ /** Enum value EventHub. */
+ EVENT_HUB("EventHub"),
+
+ /** Enum value Relay. */
+ RELAY("Relay");
+
+ /** The actual serialized value for a NameSpaceType instance. */
+ private String value;
+
+ NameSpaceType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a NameSpaceType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed NameSpaceType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static NameSpaceType fromString(String value) {
+ NameSpaceType[] items = NameSpaceType.values();
+ for (NameSpaceType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NamespaceSBAuthorizationRule.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NamespaceSBAuthorizationRule.java
new file mode 100644
index 000000000000..870781e0d262
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NamespaceSBAuthorizationRule.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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBAuthorizationRuleInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import java.util.List;
+
+/**
+ * Type representing NamespaceSBAuthorizationRule.
+ */
+public interface NamespaceSBAuthorizationRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rights value.
+ */
+ List rights();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the NamespaceSBAuthorizationRule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of NamespaceSBAuthorizationRule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a NamespaceSBAuthorizationRule definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the namespacesbauthorizationrule definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @return the next definition stage
+ */
+ WithRights withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the namespacesbauthorizationrule definition allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ * @param rights The rights associated with the rule
+ * @return the next definition stage
+ */
+ WithCreate withRights(List rights);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a NamespaceSBAuthorizationRule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRights {
+ }
+
+ /**
+ * Grouping of NamespaceSBAuthorizationRule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the namespacesbauthorizationrule update allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ * @param rights The rights associated with the rule
+ * @return the next update stage
+ */
+ Update withRights(List rights);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Namespaces.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Namespaces.java
index 2e4b5553bfad..1b4d2ce062e3 100644
--- a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Namespaces.java
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Namespaces.java
@@ -15,12 +15,13 @@
import rx.Observable;
import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
import com.microsoft.azure.arm.collection.SupportsListing;
+import rx.Completable;
import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.NamespacesInner;
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.servicebus.v2018_01_01_preview.IpFilterRule;
-import rx.Completable;
-import com.microsoft.azure.management.servicebus.v2018_01_01_preview.VirtualNetworkRule;
import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.NetworkRuleSetInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.VirtualNetworkRule;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.NamespaceSBAuthorizationRule;
/**
* Type representing Namespaces.
@@ -40,6 +41,33 @@ public interface Namespaces extends SupportsCreating checkNameAvailabilityMethodAsync(String name);
+
/**
* Gets an IpFilterRule for a Namespace by rule name.
*
@@ -72,6 +100,27 @@ public interface Namespaces extends SupportsCreating createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters);
+
+ /**
+ * Gets NetworkRuleSet 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 getNetworkRuleSetAsync(String resourceGroupName, String namespaceName);
+
/**
* Gets an VirtualNetworkRule for a Namespace by rule name.
*
@@ -105,24 +154,58 @@ public interface Namespaces extends SupportsCreating createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters);
+ Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
/**
- * Gets NetworkRuleSet for a Namespace.
+ * Gets the 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 getNetworkRuleSetAsync(String resourceGroupName, String namespaceName);
+ Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes a namespace authorization rule.
+ *
+ * @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 namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters Parameters supplied to regenerate the authorization rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters);
}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NetworkRuleSet.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NetworkRuleSet.java
index 846abd461b7f..631bad34ce10 100644
--- a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NetworkRuleSet.java
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/NetworkRuleSet.java
@@ -38,6 +38,11 @@ public interface NetworkRuleSet extends HasInner, HasManage
*/
String name();
+ /**
+ * @return the trustedServiceAccessEnabled value.
+ */
+ Boolean trustedServiceAccessEnabled();
+
/**
* @return the type value.
*/
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegion.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegion.java
new file mode 100644
index 000000000000..2a26d217fe41
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegion.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+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.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PremiumMessagingRegionInner;
+
+/**
+ * Type representing PremiumMessagingRegion.
+ */
+public interface PremiumMessagingRegion extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, HasManager {
+ /**
+ * @return the properties value.
+ */
+ PremiumMessagingRegionProperties properties();
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegionProperties.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegionProperties.java
new file mode 100644
index 000000000000..0825d18e635f
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegionProperties.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The PremiumMessagingRegionProperties model.
+ */
+public class PremiumMessagingRegionProperties {
+ /**
+ * Region code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * Full name of the region.
+ */
+ @JsonProperty(value = "fullName", access = JsonProperty.Access.WRITE_ONLY)
+ private String fullName;
+
+ /**
+ * Get region code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get full name of the region.
+ *
+ * @return the fullName value
+ */
+ public String fullName() {
+ return this.fullName;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegions.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegions.java
new file mode 100644
index 000000000000..933e1fe982c7
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PremiumMessagingRegions.java
@@ -0,0 +1,19 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PremiumMessagingRegionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PremiumMessagingRegions.
+ */
+public interface PremiumMessagingRegions extends SupportsListing, HasInner {
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpoint.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpoint.java
new file mode 100644
index 000000000000..4df9f83b45d6
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpoint.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * PrivateEndpoint information.
+ */
+public class PrivateEndpoint {
+ /**
+ * The ARM identifier for Private Endpoint.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * Get the ARM identifier for Private Endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the ARM identifier for Private Endpoint.
+ *
+ * @param id the id value to set
+ * @return the PrivateEndpoint object itself.
+ */
+ public PrivateEndpoint withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpointConnection.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpointConnection.java
new file mode 100644
index 000000000000..bd1bd1f8637e
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpointConnection.java
@@ -0,0 +1,175 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PrivateEndpointConnectionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+
+/**
+ * Type representing PrivateEndpointConnection.
+ */
+public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the privateEndpoint value.
+ */
+ PrivateEndpoint privateEndpoint();
+
+ /**
+ * @return the privateLinkServiceConnectionState value.
+ */
+ ConnectionState privateLinkServiceConnectionState();
+
+ /**
+ * @return the provisioningState value.
+ */
+ EndPointProvisioningState provisioningState();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the PrivateEndpointConnection definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a PrivateEndpointConnection definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @return the next definition stage
+ */
+ WithCreate withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify PrivateEndpoint.
+ */
+ interface WithPrivateEndpoint {
+ /**
+ * Specifies privateEndpoint.
+ * @param privateEndpoint The Private Endpoint resource for this Connection
+ * @return the next definition stage
+ */
+ WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint);
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify PrivateLinkServiceConnectionState.
+ */
+ interface WithPrivateLinkServiceConnectionState {
+ /**
+ * Specifies privateLinkServiceConnectionState.
+ * @param privateLinkServiceConnectionState Details about the state of the connection
+ * @return the next definition stage
+ */
+ WithCreate withPrivateLinkServiceConnectionState(ConnectionState privateLinkServiceConnectionState);
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify ProvisioningState.
+ */
+ interface WithProvisioningState {
+ /**
+ * Specifies provisioningState.
+ * @param provisioningState Provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'
+ * @return the next definition stage
+ */
+ WithCreate withProvisioningState(EndPointProvisioningState provisioningState);
+ }
+
+ /**
+ * 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.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithProvisioningState {
+ }
+ }
+ /**
+ * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState, UpdateStages.WithProvisioningState {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint.
+ */
+ interface WithPrivateEndpoint {
+ /**
+ * Specifies privateEndpoint.
+ * @param privateEndpoint The Private Endpoint resource for this Connection
+ * @return the next update stage
+ */
+ Update withPrivateEndpoint(PrivateEndpoint privateEndpoint);
+ }
+
+ /**
+ * The stage of the privateendpointconnection update allowing to specify PrivateLinkServiceConnectionState.
+ */
+ interface WithPrivateLinkServiceConnectionState {
+ /**
+ * Specifies privateLinkServiceConnectionState.
+ * @param privateLinkServiceConnectionState Details about the state of the connection
+ * @return the next update stage
+ */
+ Update withPrivateLinkServiceConnectionState(ConnectionState privateLinkServiceConnectionState);
+ }
+
+ /**
+ * The stage of the privateendpointconnection update allowing to specify ProvisioningState.
+ */
+ interface WithProvisioningState {
+ /**
+ * Specifies provisioningState.
+ * @param provisioningState Provisioning state of the Private Endpoint Connection. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Canceled', 'Failed'
+ * @return the next update stage
+ */
+ Update withProvisioningState(EndPointProvisioningState provisioningState);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpointConnections.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpointConnections.java
new file mode 100644
index 000000000000..0eac1da9cd98
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateEndpointConnections.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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PrivateEndpointConnectionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateEndpointConnections.
+ */
+public interface PrivateEndpointConnections extends SupportsCreating, HasInner {
+ /**
+ * Gets a description for the specified Private Endpoint Connection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param privateEndpointConnectionName The PrivateEndpointConnection name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName);
+
+ /**
+ * Gets the available PrivateEndpointConnections within 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 listAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes an existing Private Endpoint Connection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param privateEndpointConnectionName The PrivateEndpointConnection name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String privateEndpointConnectionName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkConnectionStatus.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkConnectionStatus.java
new file mode 100644
index 000000000000..96cffa3ade64
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkConnectionStatus.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PrivateLinkConnectionStatus.
+ */
+public final class PrivateLinkConnectionStatus extends ExpandableStringEnum {
+ /** Static value Pending for PrivateLinkConnectionStatus. */
+ public static final PrivateLinkConnectionStatus PENDING = fromString("Pending");
+
+ /** Static value Approved for PrivateLinkConnectionStatus. */
+ public static final PrivateLinkConnectionStatus APPROVED = fromString("Approved");
+
+ /** Static value Rejected for PrivateLinkConnectionStatus. */
+ public static final PrivateLinkConnectionStatus REJECTED = fromString("Rejected");
+
+ /** Static value Disconnected for PrivateLinkConnectionStatus. */
+ public static final PrivateLinkConnectionStatus DISCONNECTED = fromString("Disconnected");
+
+ /**
+ * Creates or finds a PrivateLinkConnectionStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PrivateLinkConnectionStatus
+ */
+ @JsonCreator
+ public static PrivateLinkConnectionStatus fromString(String name) {
+ return fromString(name, PrivateLinkConnectionStatus.class);
+ }
+
+ /**
+ * @return known PrivateLinkConnectionStatus values
+ */
+ public static Collection values() {
+ return values(PrivateLinkConnectionStatus.class);
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkResources.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkResources.java
new file mode 100644
index 000000000000..c1bad7ee4670
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkResources.java
@@ -0,0 +1,29 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PrivateLinkResourcesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateLinkResources.
+ */
+public interface PrivateLinkResources extends HasInner {
+ /**
+ * Gets lists of resources that supports Privatelinks.
+ *
+ * @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 getAsync(String resourceGroupName, String namespaceName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkResourcesListResult.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkResourcesListResult.java
new file mode 100644
index 000000000000..34bd79d84e8a
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/PrivateLinkResourcesListResult.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PrivateLinkResourcesListResultInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.PrivateLinkResourceInner;
+import java.util.List;
+
+/**
+ * Type representing PrivateLinkResourcesListResult.
+ */
+public interface PrivateLinkResourcesListResult extends HasInner, HasManager {
+ /**
+ * @return the nextLink value.
+ */
+ String nextLink();
+
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ProvisioningStateDR.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ProvisioningStateDR.java
new file mode 100644
index 000000000000..2480cb6bf96d
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/ProvisioningStateDR.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for ProvisioningStateDR.
+ */
+public enum ProvisioningStateDR {
+ /** Enum value Accepted. */
+ ACCEPTED("Accepted"),
+
+ /** Enum value Succeeded. */
+ SUCCEEDED("Succeeded"),
+
+ /** Enum value Failed. */
+ FAILED("Failed");
+
+ /** The actual serialized value for a ProvisioningStateDR instance. */
+ private String value;
+
+ ProvisioningStateDR(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ProvisioningStateDR instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ProvisioningStateDR object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ProvisioningStateDR fromString(String value) {
+ ProvisioningStateDR[] items = ProvisioningStateDR.values();
+ for (ProvisioningStateDR item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/QueueNamespaceSBAuthorizationRule.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/QueueNamespaceSBAuthorizationRule.java
new file mode 100644
index 000000000000..2356b288afa6
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/QueueNamespaceSBAuthorizationRule.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBAuthorizationRuleInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import java.util.List;
+
+/**
+ * Type representing QueueNamespaceSBAuthorizationRule.
+ */
+public interface QueueNamespaceSBAuthorizationRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rights value.
+ */
+ List rights();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the QueueNamespaceSBAuthorizationRule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithQueue, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of QueueNamespaceSBAuthorizationRule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a QueueNamespaceSBAuthorizationRule definition.
+ */
+ interface Blank extends WithQueue {
+ }
+
+ /**
+ * The stage of the queuenamespacesbauthorizationrule definition allowing to specify Queue.
+ */
+ interface WithQueue {
+ /**
+ * Specifies resourceGroupName, namespaceName, queueName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @param queueName The queue name
+ * @return the next definition stage
+ */
+ WithRights withExistingQueue(String resourceGroupName, String namespaceName, String queueName);
+ }
+
+ /**
+ * The stage of the queuenamespacesbauthorizationrule definition allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ * @param rights The rights associated with the rule
+ * @return the next definition stage
+ */
+ WithCreate withRights(List rights);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a QueueNamespaceSBAuthorizationRule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRights {
+ }
+
+ /**
+ * Grouping of QueueNamespaceSBAuthorizationRule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the queuenamespacesbauthorizationrule update allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ * @param rights The rights associated with the rule
+ * @return the next update stage
+ */
+ Update withRights(List rights);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Queues.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Queues.java
new file mode 100644
index 000000000000..582f742955bd
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Queues.java
@@ -0,0 +1,121 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.QueuesInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.QueueNamespaceSBAuthorizationRule;
+
+/**
+ * Type representing Queues.
+ */
+public interface Queues extends SupportsCreating, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ QueueNamespaceSBAuthorizationRule.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * Returns a description for the specified queue.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String queueName);
+
+ /**
+ * Gets the queues within 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 listByNamespaceAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes a queue from the specified namespace in a resource group.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String queueName);
+
+ /**
+ * Gets an authorization rule for a queue by rule name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue 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 queueName, String authorizationRuleName);
+
+ /**
+ * Gets all authorization rules for a queue.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue 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 queueName);
+
+ /**
+ * Deletes a queue authorization rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue 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 queueName, String authorizationRuleName);
+
+ /**
+ * Primary and secondary connection strings to the queue.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue 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 queueName, String authorizationRuleName);
+
+ /**
+ * Regenerates the primary or secondary connection strings to the queue.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param queueName The queue name.
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters Parameters supplied to regenerate the authorization rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String queueName, String authorizationRuleName, RegenerateAccessKeyParameters parameters);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/RegenerateAccessKeyParameters.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/RegenerateAccessKeyParameters.java
new file mode 100644
index 000000000000..3bd812083123
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/RegenerateAccessKeyParameters.java
@@ -0,0 +1,72 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters supplied to the Regenerate Authorization Rule operation,
+ * specifies which key needs to be reset.
+ */
+public class RegenerateAccessKeyParameters {
+ /**
+ * The access key to regenerate. Possible values include: 'PrimaryKey',
+ * 'SecondaryKey'.
+ */
+ @JsonProperty(value = "keyType", required = true)
+ private KeyType keyType;
+
+ /**
+ * Optional, if the key value provided, is reset for KeyType value or
+ * autogenerate Key value set for keyType.
+ */
+ @JsonProperty(value = "key")
+ private String key;
+
+ /**
+ * Get the access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey'.
+ *
+ * @return the keyType value
+ */
+ public KeyType keyType() {
+ return this.keyType;
+ }
+
+ /**
+ * Set the access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey'.
+ *
+ * @param keyType the keyType value to set
+ * @return the RegenerateAccessKeyParameters object itself.
+ */
+ public RegenerateAccessKeyParameters withKeyType(KeyType keyType) {
+ this.keyType = keyType;
+ return this;
+ }
+
+ /**
+ * Get optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType.
+ *
+ * @return the key value
+ */
+ public String key() {
+ return this.key;
+ }
+
+ /**
+ * Set optional, if the key value provided, is reset for KeyType value or autogenerate Key value set for keyType.
+ *
+ * @param key the key value to set
+ * @return the RegenerateAccessKeyParameters object itself.
+ */
+ public RegenerateAccessKeyParameters withKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Regions.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Regions.java
new file mode 100644
index 000000000000..8151a59f90f4
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Regions.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.RegionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Regions.
+ */
+public interface Regions extends HasInner {
+ /**
+ * Gets the available Regions for a given sku.
+ *
+ * @param sku The sku type.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listBySkuAsync(final String sku);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/RoleDisasterRecovery.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/RoleDisasterRecovery.java
new file mode 100644
index 000000000000..a3cf7740fa9b
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/RoleDisasterRecovery.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for RoleDisasterRecovery.
+ */
+public enum RoleDisasterRecovery {
+ /** Enum value Primary. */
+ PRIMARY("Primary"),
+
+ /** Enum value PrimaryNotReplicating. */
+ PRIMARY_NOT_REPLICATING("PrimaryNotReplicating"),
+
+ /** Enum value Secondary. */
+ SECONDARY("Secondary");
+
+ /** The actual serialized value for a RoleDisasterRecovery instance. */
+ private String value;
+
+ RoleDisasterRecovery(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a RoleDisasterRecovery instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed RoleDisasterRecovery object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static RoleDisasterRecovery fromString(String value) {
+ RoleDisasterRecovery[] items = RoleDisasterRecovery.values();
+ for (RoleDisasterRecovery item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Rule.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Rule.java
new file mode 100644
index 000000000000..1872f401a88a
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Rule.java
@@ -0,0 +1,206 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.RuleInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+
+/**
+ * Type representing Rule.
+ */
+public interface Rule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the action value.
+ */
+ Action action();
+
+ /**
+ * @return the correlationFilter value.
+ */
+ CorrelationFilter correlationFilter();
+
+ /**
+ * @return the filterType value.
+ */
+ FilterType filterType();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the sqlFilter value.
+ */
+ SqlFilter sqlFilter();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the Rule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSubscription, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of Rule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a Rule definition.
+ */
+ interface Blank extends WithSubscription {
+ }
+
+ /**
+ * The stage of the rule definition allowing to specify Subscription.
+ */
+ interface WithSubscription {
+ /**
+ * Specifies resourceGroupName, namespaceName, topicName, subscriptionName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @param topicName The topic name
+ * @param subscriptionName The subscription name
+ * @return the next definition stage
+ */
+ WithCreate withExistingSubscription(String resourceGroupName, String namespaceName, String topicName, String subscriptionName);
+ }
+
+ /**
+ * The stage of the rule definition allowing to specify Action.
+ */
+ interface WithAction {
+ /**
+ * Specifies action.
+ * @param action Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression
+ * @return the next definition stage
+ */
+ WithCreate withAction(Action action);
+ }
+
+ /**
+ * The stage of the rule definition allowing to specify CorrelationFilter.
+ */
+ interface WithCorrelationFilter {
+ /**
+ * Specifies correlationFilter.
+ * @param correlationFilter Properties of correlationFilter
+ * @return the next definition stage
+ */
+ WithCreate withCorrelationFilter(CorrelationFilter correlationFilter);
+ }
+
+ /**
+ * The stage of the rule definition allowing to specify FilterType.
+ */
+ interface WithFilterType {
+ /**
+ * Specifies filterType.
+ * @param filterType Filter type that is evaluated against a BrokeredMessage. Possible values include: 'SqlFilter', 'CorrelationFilter'
+ * @return the next definition stage
+ */
+ WithCreate withFilterType(FilterType filterType);
+ }
+
+ /**
+ * The stage of the rule definition allowing to specify SqlFilter.
+ */
+ interface WithSqlFilter {
+ /**
+ * Specifies sqlFilter.
+ * @param sqlFilter Properties of sqlFilter
+ * @return the next definition stage
+ */
+ WithCreate withSqlFilter(SqlFilter sqlFilter);
+ }
+
+ /**
+ * 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.WithAction, DefinitionStages.WithCorrelationFilter, DefinitionStages.WithFilterType, DefinitionStages.WithSqlFilter {
+ }
+ }
+ /**
+ * The template for a Rule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAction, UpdateStages.WithCorrelationFilter, UpdateStages.WithFilterType, UpdateStages.WithSqlFilter {
+ }
+
+ /**
+ * Grouping of Rule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the rule update allowing to specify Action.
+ */
+ interface WithAction {
+ /**
+ * Specifies action.
+ * @param action Represents the filter actions which are allowed for the transformation of a message that have been matched by a filter expression
+ * @return the next update stage
+ */
+ Update withAction(Action action);
+ }
+
+ /**
+ * The stage of the rule update allowing to specify CorrelationFilter.
+ */
+ interface WithCorrelationFilter {
+ /**
+ * Specifies correlationFilter.
+ * @param correlationFilter Properties of correlationFilter
+ * @return the next update stage
+ */
+ Update withCorrelationFilter(CorrelationFilter correlationFilter);
+ }
+
+ /**
+ * The stage of the rule update allowing to specify FilterType.
+ */
+ interface WithFilterType {
+ /**
+ * Specifies filterType.
+ * @param filterType Filter type that is evaluated against a BrokeredMessage. Possible values include: 'SqlFilter', 'CorrelationFilter'
+ * @return the next update stage
+ */
+ Update withFilterType(FilterType filterType);
+ }
+
+ /**
+ * The stage of the rule update allowing to specify SqlFilter.
+ */
+ interface WithSqlFilter {
+ /**
+ * Specifies sqlFilter.
+ * @param sqlFilter Properties of sqlFilter
+ * @return the next update stage
+ */
+ Update withSqlFilter(SqlFilter sqlFilter);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Rules.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Rules.java
new file mode 100644
index 000000000000..3cfc27500377
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Rules.java
@@ -0,0 +1,59 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.RulesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Rules.
+ */
+public interface Rules extends SupportsCreating, HasInner {
+ /**
+ * Retrieves the description for the specified rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @param subscriptionName The subscription name.
+ * @param ruleName The rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String topicName, String subscriptionName, String ruleName);
+
+ /**
+ * List all the rules within given topic-subscription.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @param subscriptionName The subscription name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listBySubscriptionsAsync(final String resourceGroupName, final String namespaceName, final String topicName, final String subscriptionName);
+
+ /**
+ * Deletes an existing rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @param subscriptionName The subscription name.
+ * @param ruleName The rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String topicName, String subscriptionName, String ruleName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespace.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespace.java
index f4715c499bd3..1cd00f1c799d 100644
--- a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespace.java
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespace.java
@@ -30,6 +30,16 @@ public interface SBNamespace extends HasInner, Resource, Group
*/
DateTime createdAt();
+ /**
+ * @return the encryption value.
+ */
+ Encryption encryption();
+
+ /**
+ * @return the identity value.
+ */
+ Identity identity();
+
/**
* @return the metricId value.
*/
@@ -82,6 +92,30 @@ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
}
+ /**
+ * The stage of the sbnamespace definition allowing to specify Encryption.
+ */
+ interface WithEncryption {
+ /**
+ * Specifies encryption.
+ * @param encryption Properties of BYOK Encryption description
+ * @return the next definition stage
+ */
+ WithCreate withEncryption(Encryption encryption);
+ }
+
+ /**
+ * The stage of the sbnamespace definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity Properties of BYOK Identity description
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(Identity identity);
+ }
+
/**
* The stage of the sbnamespace definition allowing to specify Sku.
*/
@@ -111,19 +145,43 @@ interface WithZoneRedundant {
* 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.WithSku, DefinitionStages.WithZoneRedundant {
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithEncryption, DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithZoneRedundant {
}
}
/**
* The template for a SBNamespace update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithSku, UpdateStages.WithZoneRedundant {
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithEncryption, UpdateStages.WithIdentity, UpdateStages.WithSku, UpdateStages.WithZoneRedundant {
}
/**
* Grouping of SBNamespace update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the sbnamespace update allowing to specify Encryption.
+ */
+ interface WithEncryption {
+ /**
+ * Specifies encryption.
+ * @param encryption Properties of BYOK Encryption description
+ * @return the next update stage
+ */
+ Update withEncryption(Encryption encryption);
+ }
+
+ /**
+ * The stage of the sbnamespace update allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity Properties of BYOK Identity description
+ * @return the next update stage
+ */
+ Update withIdentity(Identity identity);
+ }
+
/**
* The stage of the sbnamespace update allowing to specify Sku.
*/
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceMigrate.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceMigrate.java
new file mode 100644
index 000000000000..9714fabb67c5
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceMigrate.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Namespace Migrate Object.
+ */
+public class SBNamespaceMigrate {
+ /**
+ * Type of namespaces. Possible values include: 'Messaging',
+ * 'NotificationHub', 'Mixed', 'EventHub', 'Relay'.
+ */
+ @JsonProperty(value = "targetNamespaceType", required = true)
+ private NameSpaceType targetNamespaceType;
+
+ /**
+ * Get type of namespaces. Possible values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', 'Relay'.
+ *
+ * @return the targetNamespaceType value
+ */
+ public NameSpaceType targetNamespaceType() {
+ return this.targetNamespaceType;
+ }
+
+ /**
+ * Set type of namespaces. Possible values include: 'Messaging', 'NotificationHub', 'Mixed', 'EventHub', 'Relay'.
+ *
+ * @param targetNamespaceType the targetNamespaceType value to set
+ * @return the SBNamespaceMigrate object itself.
+ */
+ public SBNamespaceMigrate withTargetNamespaceType(NameSpaceType targetNamespaceType) {
+ this.targetNamespaceType = targetNamespaceType;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceUpdateParameters.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceUpdateParameters.java
index ee0d086c2b40..10fb6765f77c 100644
--- a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceUpdateParameters.java
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBNamespaceUpdateParameters.java
@@ -60,6 +60,18 @@ public class SBNamespaceUpdateParameters extends ResourceNamespacePatch {
@JsonProperty(value = "properties.zoneRedundant")
private Boolean zoneRedundant;
+ /**
+ * Properties of BYOK Encryption description.
+ */
+ @JsonProperty(value = "properties.encryption")
+ private Encryption encryption;
+
+ /**
+ * Properties of BYOK Identity description.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
/**
* Get properties of SKU.
*
@@ -145,4 +157,44 @@ public SBNamespaceUpdateParameters withZoneRedundant(Boolean zoneRedundant) {
return this;
}
+ /**
+ * Get properties of BYOK Encryption description.
+ *
+ * @return the encryption value
+ */
+ public Encryption encryption() {
+ return this.encryption;
+ }
+
+ /**
+ * Set properties of BYOK Encryption description.
+ *
+ * @param encryption the encryption value to set
+ * @return the SBNamespaceUpdateParameters object itself.
+ */
+ public SBNamespaceUpdateParameters withEncryption(Encryption encryption) {
+ this.encryption = encryption;
+ return this;
+ }
+
+ /**
+ * Get properties of BYOK Identity description.
+ *
+ * @return the identity value
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set properties of BYOK Identity description.
+ *
+ * @param identity the identity value to set
+ * @return the SBNamespaceUpdateParameters object itself.
+ */
+ public SBNamespaceUpdateParameters withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBQueue.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBQueue.java
new file mode 100644
index 000000000000..369fd5336ede
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBQueue.java
@@ -0,0 +1,555 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBQueueInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import org.joda.time.DateTime;
+import org.joda.time.Period;
+
+/**
+ * Type representing SBQueue.
+ */
+public interface SBQueue extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the accessedAt value.
+ */
+ DateTime accessedAt();
+
+ /**
+ * @return the autoDeleteOnIdle value.
+ */
+ Period autoDeleteOnIdle();
+
+ /**
+ * @return the countDetails value.
+ */
+ MessageCountDetails countDetails();
+
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the deadLetteringOnMessageExpiration value.
+ */
+ Boolean deadLetteringOnMessageExpiration();
+
+ /**
+ * @return the defaultMessageTimeToLive value.
+ */
+ Period defaultMessageTimeToLive();
+
+ /**
+ * @return the duplicateDetectionHistoryTimeWindow value.
+ */
+ Period duplicateDetectionHistoryTimeWindow();
+
+ /**
+ * @return the enableBatchedOperations value.
+ */
+ Boolean enableBatchedOperations();
+
+ /**
+ * @return the enableExpress value.
+ */
+ Boolean enableExpress();
+
+ /**
+ * @return the enablePartitioning value.
+ */
+ Boolean enablePartitioning();
+
+ /**
+ * @return the forwardDeadLetteredMessagesTo value.
+ */
+ String forwardDeadLetteredMessagesTo();
+
+ /**
+ * @return the forwardTo value.
+ */
+ String forwardTo();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lockDuration value.
+ */
+ Period lockDuration();
+
+ /**
+ * @return the maxDeliveryCount value.
+ */
+ Integer maxDeliveryCount();
+
+ /**
+ * @return the maxSizeInMegabytes value.
+ */
+ Integer maxSizeInMegabytes();
+
+ /**
+ * @return the messageCount value.
+ */
+ Long messageCount();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the requiresDuplicateDetection value.
+ */
+ Boolean requiresDuplicateDetection();
+
+ /**
+ * @return the requiresSession value.
+ */
+ Boolean requiresSession();
+
+ /**
+ * @return the sizeInBytes value.
+ */
+ Long sizeInBytes();
+
+ /**
+ * @return the status value.
+ */
+ EntityStatus status();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * The entirety of the SBQueue definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of SBQueue definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a SBQueue definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @return the next definition stage
+ */
+ WithCreate withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify AutoDeleteOnIdle.
+ */
+ interface WithAutoDeleteOnIdle {
+ /**
+ * Specifies autoDeleteOnIdle.
+ * @param autoDeleteOnIdle ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes
+ * @return the next definition stage
+ */
+ WithCreate withAutoDeleteOnIdle(Period autoDeleteOnIdle);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify DeadLetteringOnMessageExpiration.
+ */
+ interface WithDeadLetteringOnMessageExpiration {
+ /**
+ * Specifies deadLetteringOnMessageExpiration.
+ * @param deadLetteringOnMessageExpiration A value that indicates whether this queue has dead letter support when a message expires
+ * @return the next definition stage
+ */
+ WithCreate withDeadLetteringOnMessageExpiration(Boolean deadLetteringOnMessageExpiration);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify DefaultMessageTimeToLive.
+ */
+ interface WithDefaultMessageTimeToLive {
+ /**
+ * Specifies defaultMessageTimeToLive.
+ * @param defaultMessageTimeToLive ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself
+ * @return the next definition stage
+ */
+ WithCreate withDefaultMessageTimeToLive(Period defaultMessageTimeToLive);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify DuplicateDetectionHistoryTimeWindow.
+ */
+ interface WithDuplicateDetectionHistoryTimeWindow {
+ /**
+ * Specifies duplicateDetectionHistoryTimeWindow.
+ * @param duplicateDetectionHistoryTimeWindow ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes
+ * @return the next definition stage
+ */
+ WithCreate withDuplicateDetectionHistoryTimeWindow(Period duplicateDetectionHistoryTimeWindow);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify EnableBatchedOperations.
+ */
+ interface WithEnableBatchedOperations {
+ /**
+ * Specifies enableBatchedOperations.
+ * @param enableBatchedOperations Value that indicates whether server-side batched operations are enabled
+ * @return the next definition stage
+ */
+ WithCreate withEnableBatchedOperations(Boolean enableBatchedOperations);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify EnableExpress.
+ */
+ interface WithEnableExpress {
+ /**
+ * Specifies enableExpress.
+ * @param enableExpress A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage
+ * @return the next definition stage
+ */
+ WithCreate withEnableExpress(Boolean enableExpress);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify EnablePartitioning.
+ */
+ interface WithEnablePartitioning {
+ /**
+ * Specifies enablePartitioning.
+ * @param enablePartitioning A value that indicates whether the queue is to be partitioned across multiple message brokers
+ * @return the next definition stage
+ */
+ WithCreate withEnablePartitioning(Boolean enablePartitioning);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify ForwardDeadLetteredMessagesTo.
+ */
+ interface WithForwardDeadLetteredMessagesTo {
+ /**
+ * Specifies forwardDeadLetteredMessagesTo.
+ * @param forwardDeadLetteredMessagesTo Queue/Topic name to forward the Dead Letter message
+ * @return the next definition stage
+ */
+ WithCreate withForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify ForwardTo.
+ */
+ interface WithForwardTo {
+ /**
+ * Specifies forwardTo.
+ * @param forwardTo Queue/Topic name to forward the messages
+ * @return the next definition stage
+ */
+ WithCreate withForwardTo(String forwardTo);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify LockDuration.
+ */
+ interface WithLockDuration {
+ /**
+ * Specifies lockDuration.
+ * @param lockDuration ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute
+ * @return the next definition stage
+ */
+ WithCreate withLockDuration(Period lockDuration);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify MaxDeliveryCount.
+ */
+ interface WithMaxDeliveryCount {
+ /**
+ * Specifies maxDeliveryCount.
+ * @param maxDeliveryCount The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10
+ * @return the next definition stage
+ */
+ WithCreate withMaxDeliveryCount(Integer maxDeliveryCount);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify MaxSizeInMegabytes.
+ */
+ interface WithMaxSizeInMegabytes {
+ /**
+ * Specifies maxSizeInMegabytes.
+ * @param maxSizeInMegabytes The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024
+ * @return the next definition stage
+ */
+ WithCreate withMaxSizeInMegabytes(Integer maxSizeInMegabytes);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify RequiresDuplicateDetection.
+ */
+ interface WithRequiresDuplicateDetection {
+ /**
+ * Specifies requiresDuplicateDetection.
+ * @param requiresDuplicateDetection A value indicating if this queue requires duplicate detection
+ * @return the next definition stage
+ */
+ WithCreate withRequiresDuplicateDetection(Boolean requiresDuplicateDetection);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify RequiresSession.
+ */
+ interface WithRequiresSession {
+ /**
+ * Specifies requiresSession.
+ * @param requiresSession A value that indicates whether the queue supports the concept of sessions
+ * @return the next definition stage
+ */
+ WithCreate withRequiresSession(Boolean requiresSession);
+ }
+
+ /**
+ * The stage of the sbqueue definition allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ * @param status Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @return the next definition stage
+ */
+ WithCreate withStatus(EntityStatus status);
+ }
+
+ /**
+ * 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.WithAutoDeleteOnIdle, DefinitionStages.WithDeadLetteringOnMessageExpiration, DefinitionStages.WithDefaultMessageTimeToLive, DefinitionStages.WithDuplicateDetectionHistoryTimeWindow, DefinitionStages.WithEnableBatchedOperations, DefinitionStages.WithEnableExpress, DefinitionStages.WithEnablePartitioning, DefinitionStages.WithForwardDeadLetteredMessagesTo, DefinitionStages.WithForwardTo, DefinitionStages.WithLockDuration, DefinitionStages.WithMaxDeliveryCount, DefinitionStages.WithMaxSizeInMegabytes, DefinitionStages.WithRequiresDuplicateDetection, DefinitionStages.WithRequiresSession, DefinitionStages.WithStatus {
+ }
+ }
+ /**
+ * The template for a SBQueue update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAutoDeleteOnIdle, UpdateStages.WithDeadLetteringOnMessageExpiration, UpdateStages.WithDefaultMessageTimeToLive, UpdateStages.WithDuplicateDetectionHistoryTimeWindow, UpdateStages.WithEnableBatchedOperations, UpdateStages.WithEnableExpress, UpdateStages.WithEnablePartitioning, UpdateStages.WithForwardDeadLetteredMessagesTo, UpdateStages.WithForwardTo, UpdateStages.WithLockDuration, UpdateStages.WithMaxDeliveryCount, UpdateStages.WithMaxSizeInMegabytes, UpdateStages.WithRequiresDuplicateDetection, UpdateStages.WithRequiresSession, UpdateStages.WithStatus {
+ }
+
+ /**
+ * Grouping of SBQueue update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the sbqueue update allowing to specify AutoDeleteOnIdle.
+ */
+ interface WithAutoDeleteOnIdle {
+ /**
+ * Specifies autoDeleteOnIdle.
+ * @param autoDeleteOnIdle ISO 8061 timeSpan idle interval after which the queue is automatically deleted. The minimum duration is 5 minutes
+ * @return the next update stage
+ */
+ Update withAutoDeleteOnIdle(Period autoDeleteOnIdle);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify DeadLetteringOnMessageExpiration.
+ */
+ interface WithDeadLetteringOnMessageExpiration {
+ /**
+ * Specifies deadLetteringOnMessageExpiration.
+ * @param deadLetteringOnMessageExpiration A value that indicates whether this queue has dead letter support when a message expires
+ * @return the next update stage
+ */
+ Update withDeadLetteringOnMessageExpiration(Boolean deadLetteringOnMessageExpiration);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify DefaultMessageTimeToLive.
+ */
+ interface WithDefaultMessageTimeToLive {
+ /**
+ * Specifies defaultMessageTimeToLive.
+ * @param defaultMessageTimeToLive ISO 8601 default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself
+ * @return the next update stage
+ */
+ Update withDefaultMessageTimeToLive(Period defaultMessageTimeToLive);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify DuplicateDetectionHistoryTimeWindow.
+ */
+ interface WithDuplicateDetectionHistoryTimeWindow {
+ /**
+ * Specifies duplicateDetectionHistoryTimeWindow.
+ * @param duplicateDetectionHistoryTimeWindow ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes
+ * @return the next update stage
+ */
+ Update withDuplicateDetectionHistoryTimeWindow(Period duplicateDetectionHistoryTimeWindow);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify EnableBatchedOperations.
+ */
+ interface WithEnableBatchedOperations {
+ /**
+ * Specifies enableBatchedOperations.
+ * @param enableBatchedOperations Value that indicates whether server-side batched operations are enabled
+ * @return the next update stage
+ */
+ Update withEnableBatchedOperations(Boolean enableBatchedOperations);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify EnableExpress.
+ */
+ interface WithEnableExpress {
+ /**
+ * Specifies enableExpress.
+ * @param enableExpress A value that indicates whether Express Entities are enabled. An express queue holds a message in memory temporarily before writing it to persistent storage
+ * @return the next update stage
+ */
+ Update withEnableExpress(Boolean enableExpress);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify EnablePartitioning.
+ */
+ interface WithEnablePartitioning {
+ /**
+ * Specifies enablePartitioning.
+ * @param enablePartitioning A value that indicates whether the queue is to be partitioned across multiple message brokers
+ * @return the next update stage
+ */
+ Update withEnablePartitioning(Boolean enablePartitioning);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify ForwardDeadLetteredMessagesTo.
+ */
+ interface WithForwardDeadLetteredMessagesTo {
+ /**
+ * Specifies forwardDeadLetteredMessagesTo.
+ * @param forwardDeadLetteredMessagesTo Queue/Topic name to forward the Dead Letter message
+ * @return the next update stage
+ */
+ Update withForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify ForwardTo.
+ */
+ interface WithForwardTo {
+ /**
+ * Specifies forwardTo.
+ * @param forwardTo Queue/Topic name to forward the messages
+ * @return the next update stage
+ */
+ Update withForwardTo(String forwardTo);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify LockDuration.
+ */
+ interface WithLockDuration {
+ /**
+ * Specifies lockDuration.
+ * @param lockDuration ISO 8601 timespan duration of a peek-lock; that is, the amount of time that the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the default value is 1 minute
+ * @return the next update stage
+ */
+ Update withLockDuration(Period lockDuration);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify MaxDeliveryCount.
+ */
+ interface WithMaxDeliveryCount {
+ /**
+ * Specifies maxDeliveryCount.
+ * @param maxDeliveryCount The maximum delivery count. A message is automatically deadlettered after this number of deliveries. default value is 10
+ * @return the next update stage
+ */
+ Update withMaxDeliveryCount(Integer maxDeliveryCount);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify MaxSizeInMegabytes.
+ */
+ interface WithMaxSizeInMegabytes {
+ /**
+ * Specifies maxSizeInMegabytes.
+ * @param maxSizeInMegabytes The maximum size of the queue in megabytes, which is the size of memory allocated for the queue. Default is 1024
+ * @return the next update stage
+ */
+ Update withMaxSizeInMegabytes(Integer maxSizeInMegabytes);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify RequiresDuplicateDetection.
+ */
+ interface WithRequiresDuplicateDetection {
+ /**
+ * Specifies requiresDuplicateDetection.
+ * @param requiresDuplicateDetection A value indicating if this queue requires duplicate detection
+ * @return the next update stage
+ */
+ Update withRequiresDuplicateDetection(Boolean requiresDuplicateDetection);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify RequiresSession.
+ */
+ interface WithRequiresSession {
+ /**
+ * Specifies requiresSession.
+ * @param requiresSession A value that indicates whether the queue supports the concept of sessions
+ * @return the next update stage
+ */
+ Update withRequiresSession(Boolean requiresSession);
+ }
+
+ /**
+ * The stage of the sbqueue update allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ * @param status Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @return the next update stage
+ */
+ Update withStatus(EntityStatus status);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBSubscription.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBSubscription.java
new file mode 100644
index 000000000000..16c09864bcc3
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBSubscription.java
@@ -0,0 +1,464 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBSubscriptionInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import org.joda.time.DateTime;
+import org.joda.time.Period;
+
+/**
+ * Type representing SBSubscription.
+ */
+public interface SBSubscription extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the accessedAt value.
+ */
+ DateTime accessedAt();
+
+ /**
+ * @return the autoDeleteOnIdle value.
+ */
+ Period autoDeleteOnIdle();
+
+ /**
+ * @return the countDetails value.
+ */
+ MessageCountDetails countDetails();
+
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the deadLetteringOnFilterEvaluationExceptions value.
+ */
+ Boolean deadLetteringOnFilterEvaluationExceptions();
+
+ /**
+ * @return the deadLetteringOnMessageExpiration value.
+ */
+ Boolean deadLetteringOnMessageExpiration();
+
+ /**
+ * @return the defaultMessageTimeToLive value.
+ */
+ Period defaultMessageTimeToLive();
+
+ /**
+ * @return the duplicateDetectionHistoryTimeWindow value.
+ */
+ Period duplicateDetectionHistoryTimeWindow();
+
+ /**
+ * @return the enableBatchedOperations value.
+ */
+ Boolean enableBatchedOperations();
+
+ /**
+ * @return the forwardDeadLetteredMessagesTo value.
+ */
+ String forwardDeadLetteredMessagesTo();
+
+ /**
+ * @return the forwardTo value.
+ */
+ String forwardTo();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lockDuration value.
+ */
+ Period lockDuration();
+
+ /**
+ * @return the maxDeliveryCount value.
+ */
+ Integer maxDeliveryCount();
+
+ /**
+ * @return the messageCount value.
+ */
+ Long messageCount();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the requiresSession value.
+ */
+ Boolean requiresSession();
+
+ /**
+ * @return the status value.
+ */
+ EntityStatus status();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * The entirety of the SBSubscription definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithTopic, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of SBSubscription definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a SBSubscription definition.
+ */
+ interface Blank extends WithTopic {
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify Topic.
+ */
+ interface WithTopic {
+ /**
+ * Specifies resourceGroupName, namespaceName, topicName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @param topicName The topic name
+ * @return the next definition stage
+ */
+ WithCreate withExistingTopic(String resourceGroupName, String namespaceName, String topicName);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify AutoDeleteOnIdle.
+ */
+ interface WithAutoDeleteOnIdle {
+ /**
+ * Specifies autoDeleteOnIdle.
+ * @param autoDeleteOnIdle ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes
+ * @return the next definition stage
+ */
+ WithCreate withAutoDeleteOnIdle(Period autoDeleteOnIdle);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify DeadLetteringOnFilterEvaluationExceptions.
+ */
+ interface WithDeadLetteringOnFilterEvaluationExceptions {
+ /**
+ * Specifies deadLetteringOnFilterEvaluationExceptions.
+ * @param deadLetteringOnFilterEvaluationExceptions Value that indicates whether a subscription has dead letter support on filter evaluation exceptions
+ * @return the next definition stage
+ */
+ WithCreate withDeadLetteringOnFilterEvaluationExceptions(Boolean deadLetteringOnFilterEvaluationExceptions);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify DeadLetteringOnMessageExpiration.
+ */
+ interface WithDeadLetteringOnMessageExpiration {
+ /**
+ * Specifies deadLetteringOnMessageExpiration.
+ * @param deadLetteringOnMessageExpiration Value that indicates whether a subscription has dead letter support when a message expires
+ * @return the next definition stage
+ */
+ WithCreate withDeadLetteringOnMessageExpiration(Boolean deadLetteringOnMessageExpiration);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify DefaultMessageTimeToLive.
+ */
+ interface WithDefaultMessageTimeToLive {
+ /**
+ * Specifies defaultMessageTimeToLive.
+ * @param defaultMessageTimeToLive ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself
+ * @return the next definition stage
+ */
+ WithCreate withDefaultMessageTimeToLive(Period defaultMessageTimeToLive);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify DuplicateDetectionHistoryTimeWindow.
+ */
+ interface WithDuplicateDetectionHistoryTimeWindow {
+ /**
+ * Specifies duplicateDetectionHistoryTimeWindow.
+ * @param duplicateDetectionHistoryTimeWindow ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes
+ * @return the next definition stage
+ */
+ WithCreate withDuplicateDetectionHistoryTimeWindow(Period duplicateDetectionHistoryTimeWindow);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify EnableBatchedOperations.
+ */
+ interface WithEnableBatchedOperations {
+ /**
+ * Specifies enableBatchedOperations.
+ * @param enableBatchedOperations Value that indicates whether server-side batched operations are enabled
+ * @return the next definition stage
+ */
+ WithCreate withEnableBatchedOperations(Boolean enableBatchedOperations);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify ForwardDeadLetteredMessagesTo.
+ */
+ interface WithForwardDeadLetteredMessagesTo {
+ /**
+ * Specifies forwardDeadLetteredMessagesTo.
+ * @param forwardDeadLetteredMessagesTo Queue/Topic name to forward the Dead Letter message
+ * @return the next definition stage
+ */
+ WithCreate withForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify ForwardTo.
+ */
+ interface WithForwardTo {
+ /**
+ * Specifies forwardTo.
+ * @param forwardTo Queue/Topic name to forward the messages
+ * @return the next definition stage
+ */
+ WithCreate withForwardTo(String forwardTo);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify LockDuration.
+ */
+ interface WithLockDuration {
+ /**
+ * Specifies lockDuration.
+ * @param lockDuration ISO 8061 lock duration timespan for the subscription. The default value is 1 minute
+ * @return the next definition stage
+ */
+ WithCreate withLockDuration(Period lockDuration);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify MaxDeliveryCount.
+ */
+ interface WithMaxDeliveryCount {
+ /**
+ * Specifies maxDeliveryCount.
+ * @param maxDeliveryCount Number of maximum deliveries
+ * @return the next definition stage
+ */
+ WithCreate withMaxDeliveryCount(Integer maxDeliveryCount);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify RequiresSession.
+ */
+ interface WithRequiresSession {
+ /**
+ * Specifies requiresSession.
+ * @param requiresSession Value indicating if a subscription supports the concept of sessions
+ * @return the next definition stage
+ */
+ WithCreate withRequiresSession(Boolean requiresSession);
+ }
+
+ /**
+ * The stage of the sbsubscription definition allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ * @param status Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @return the next definition stage
+ */
+ WithCreate withStatus(EntityStatus status);
+ }
+
+ /**
+ * 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.WithAutoDeleteOnIdle, DefinitionStages.WithDeadLetteringOnFilterEvaluationExceptions, DefinitionStages.WithDeadLetteringOnMessageExpiration, DefinitionStages.WithDefaultMessageTimeToLive, DefinitionStages.WithDuplicateDetectionHistoryTimeWindow, DefinitionStages.WithEnableBatchedOperations, DefinitionStages.WithForwardDeadLetteredMessagesTo, DefinitionStages.WithForwardTo, DefinitionStages.WithLockDuration, DefinitionStages.WithMaxDeliveryCount, DefinitionStages.WithRequiresSession, DefinitionStages.WithStatus {
+ }
+ }
+ /**
+ * The template for a SBSubscription update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAutoDeleteOnIdle, UpdateStages.WithDeadLetteringOnFilterEvaluationExceptions, UpdateStages.WithDeadLetteringOnMessageExpiration, UpdateStages.WithDefaultMessageTimeToLive, UpdateStages.WithDuplicateDetectionHistoryTimeWindow, UpdateStages.WithEnableBatchedOperations, UpdateStages.WithForwardDeadLetteredMessagesTo, UpdateStages.WithForwardTo, UpdateStages.WithLockDuration, UpdateStages.WithMaxDeliveryCount, UpdateStages.WithRequiresSession, UpdateStages.WithStatus {
+ }
+
+ /**
+ * Grouping of SBSubscription update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the sbsubscription update allowing to specify AutoDeleteOnIdle.
+ */
+ interface WithAutoDeleteOnIdle {
+ /**
+ * Specifies autoDeleteOnIdle.
+ * @param autoDeleteOnIdle ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes
+ * @return the next update stage
+ */
+ Update withAutoDeleteOnIdle(Period autoDeleteOnIdle);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify DeadLetteringOnFilterEvaluationExceptions.
+ */
+ interface WithDeadLetteringOnFilterEvaluationExceptions {
+ /**
+ * Specifies deadLetteringOnFilterEvaluationExceptions.
+ * @param deadLetteringOnFilterEvaluationExceptions Value that indicates whether a subscription has dead letter support on filter evaluation exceptions
+ * @return the next update stage
+ */
+ Update withDeadLetteringOnFilterEvaluationExceptions(Boolean deadLetteringOnFilterEvaluationExceptions);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify DeadLetteringOnMessageExpiration.
+ */
+ interface WithDeadLetteringOnMessageExpiration {
+ /**
+ * Specifies deadLetteringOnMessageExpiration.
+ * @param deadLetteringOnMessageExpiration Value that indicates whether a subscription has dead letter support when a message expires
+ * @return the next update stage
+ */
+ Update withDeadLetteringOnMessageExpiration(Boolean deadLetteringOnMessageExpiration);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify DefaultMessageTimeToLive.
+ */
+ interface WithDefaultMessageTimeToLive {
+ /**
+ * Specifies defaultMessageTimeToLive.
+ * @param defaultMessageTimeToLive ISO 8061 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself
+ * @return the next update stage
+ */
+ Update withDefaultMessageTimeToLive(Period defaultMessageTimeToLive);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify DuplicateDetectionHistoryTimeWindow.
+ */
+ interface WithDuplicateDetectionHistoryTimeWindow {
+ /**
+ * Specifies duplicateDetectionHistoryTimeWindow.
+ * @param duplicateDetectionHistoryTimeWindow ISO 8601 timeSpan structure that defines the duration of the duplicate detection history. The default value is 10 minutes
+ * @return the next update stage
+ */
+ Update withDuplicateDetectionHistoryTimeWindow(Period duplicateDetectionHistoryTimeWindow);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify EnableBatchedOperations.
+ */
+ interface WithEnableBatchedOperations {
+ /**
+ * Specifies enableBatchedOperations.
+ * @param enableBatchedOperations Value that indicates whether server-side batched operations are enabled
+ * @return the next update stage
+ */
+ Update withEnableBatchedOperations(Boolean enableBatchedOperations);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify ForwardDeadLetteredMessagesTo.
+ */
+ interface WithForwardDeadLetteredMessagesTo {
+ /**
+ * Specifies forwardDeadLetteredMessagesTo.
+ * @param forwardDeadLetteredMessagesTo Queue/Topic name to forward the Dead Letter message
+ * @return the next update stage
+ */
+ Update withForwardDeadLetteredMessagesTo(String forwardDeadLetteredMessagesTo);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify ForwardTo.
+ */
+ interface WithForwardTo {
+ /**
+ * Specifies forwardTo.
+ * @param forwardTo Queue/Topic name to forward the messages
+ * @return the next update stage
+ */
+ Update withForwardTo(String forwardTo);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify LockDuration.
+ */
+ interface WithLockDuration {
+ /**
+ * Specifies lockDuration.
+ * @param lockDuration ISO 8061 lock duration timespan for the subscription. The default value is 1 minute
+ * @return the next update stage
+ */
+ Update withLockDuration(Period lockDuration);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify MaxDeliveryCount.
+ */
+ interface WithMaxDeliveryCount {
+ /**
+ * Specifies maxDeliveryCount.
+ * @param maxDeliveryCount Number of maximum deliveries
+ * @return the next update stage
+ */
+ Update withMaxDeliveryCount(Integer maxDeliveryCount);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify RequiresSession.
+ */
+ interface WithRequiresSession {
+ /**
+ * Specifies requiresSession.
+ * @param requiresSession Value indicating if a subscription supports the concept of sessions
+ * @return the next update stage
+ */
+ Update withRequiresSession(Boolean requiresSession);
+ }
+
+ /**
+ * The stage of the sbsubscription update allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ * @param status Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @return the next update stage
+ */
+ Update withStatus(EntityStatus status);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBTopic.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBTopic.java
new file mode 100644
index 000000000000..fdec9db52ae5
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SBTopic.java
@@ -0,0 +1,410 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBTopicInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import org.joda.time.DateTime;
+import org.joda.time.Period;
+
+/**
+ * Type representing SBTopic.
+ */
+public interface SBTopic extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the accessedAt value.
+ */
+ DateTime accessedAt();
+
+ /**
+ * @return the autoDeleteOnIdle value.
+ */
+ Period autoDeleteOnIdle();
+
+ /**
+ * @return the countDetails value.
+ */
+ MessageCountDetails countDetails();
+
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the defaultMessageTimeToLive value.
+ */
+ Period defaultMessageTimeToLive();
+
+ /**
+ * @return the duplicateDetectionHistoryTimeWindow value.
+ */
+ Period duplicateDetectionHistoryTimeWindow();
+
+ /**
+ * @return the enableBatchedOperations value.
+ */
+ Boolean enableBatchedOperations();
+
+ /**
+ * @return the enableExpress value.
+ */
+ Boolean enableExpress();
+
+ /**
+ * @return the enablePartitioning value.
+ */
+ Boolean enablePartitioning();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the maxSizeInMegabytes value.
+ */
+ Integer maxSizeInMegabytes();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the requiresDuplicateDetection value.
+ */
+ Boolean requiresDuplicateDetection();
+
+ /**
+ * @return the sizeInBytes value.
+ */
+ Long sizeInBytes();
+
+ /**
+ * @return the status value.
+ */
+ EntityStatus status();
+
+ /**
+ * @return the subscriptionCount value.
+ */
+ Integer subscriptionCount();
+
+ /**
+ * @return the supportOrdering value.
+ */
+ Boolean supportOrdering();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * The entirety of the SBTopic definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of SBTopic definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a SBTopic definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify Namespace.
+ */
+ interface WithNamespace {
+ /**
+ * Specifies resourceGroupName, namespaceName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @return the next definition stage
+ */
+ WithCreate withExistingNamespace(String resourceGroupName, String namespaceName);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify AutoDeleteOnIdle.
+ */
+ interface WithAutoDeleteOnIdle {
+ /**
+ * Specifies autoDeleteOnIdle.
+ * @param autoDeleteOnIdle ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes
+ * @return the next definition stage
+ */
+ WithCreate withAutoDeleteOnIdle(Period autoDeleteOnIdle);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify DefaultMessageTimeToLive.
+ */
+ interface WithDefaultMessageTimeToLive {
+ /**
+ * Specifies defaultMessageTimeToLive.
+ * @param defaultMessageTimeToLive ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself
+ * @return the next definition stage
+ */
+ WithCreate withDefaultMessageTimeToLive(Period defaultMessageTimeToLive);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify DuplicateDetectionHistoryTimeWindow.
+ */
+ interface WithDuplicateDetectionHistoryTimeWindow {
+ /**
+ * Specifies duplicateDetectionHistoryTimeWindow.
+ * @param duplicateDetectionHistoryTimeWindow ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes
+ * @return the next definition stage
+ */
+ WithCreate withDuplicateDetectionHistoryTimeWindow(Period duplicateDetectionHistoryTimeWindow);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify EnableBatchedOperations.
+ */
+ interface WithEnableBatchedOperations {
+ /**
+ * Specifies enableBatchedOperations.
+ * @param enableBatchedOperations Value that indicates whether server-side batched operations are enabled
+ * @return the next definition stage
+ */
+ WithCreate withEnableBatchedOperations(Boolean enableBatchedOperations);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify EnableExpress.
+ */
+ interface WithEnableExpress {
+ /**
+ * Specifies enableExpress.
+ * @param enableExpress Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage
+ * @return the next definition stage
+ */
+ WithCreate withEnableExpress(Boolean enableExpress);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify EnablePartitioning.
+ */
+ interface WithEnablePartitioning {
+ /**
+ * Specifies enablePartitioning.
+ * @param enablePartitioning Value that indicates whether the topic to be partitioned across multiple message brokers is enabled
+ * @return the next definition stage
+ */
+ WithCreate withEnablePartitioning(Boolean enablePartitioning);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify MaxSizeInMegabytes.
+ */
+ interface WithMaxSizeInMegabytes {
+ /**
+ * Specifies maxSizeInMegabytes.
+ * @param maxSizeInMegabytes Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024
+ * @return the next definition stage
+ */
+ WithCreate withMaxSizeInMegabytes(Integer maxSizeInMegabytes);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify RequiresDuplicateDetection.
+ */
+ interface WithRequiresDuplicateDetection {
+ /**
+ * Specifies requiresDuplicateDetection.
+ * @param requiresDuplicateDetection Value indicating if this topic requires duplicate detection
+ * @return the next definition stage
+ */
+ WithCreate withRequiresDuplicateDetection(Boolean requiresDuplicateDetection);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ * @param status Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @return the next definition stage
+ */
+ WithCreate withStatus(EntityStatus status);
+ }
+
+ /**
+ * The stage of the sbtopic definition allowing to specify SupportOrdering.
+ */
+ interface WithSupportOrdering {
+ /**
+ * Specifies supportOrdering.
+ * @param supportOrdering Value that indicates whether the topic supports ordering
+ * @return the next definition stage
+ */
+ WithCreate withSupportOrdering(Boolean supportOrdering);
+ }
+
+ /**
+ * 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.WithAutoDeleteOnIdle, DefinitionStages.WithDefaultMessageTimeToLive, DefinitionStages.WithDuplicateDetectionHistoryTimeWindow, DefinitionStages.WithEnableBatchedOperations, DefinitionStages.WithEnableExpress, DefinitionStages.WithEnablePartitioning, DefinitionStages.WithMaxSizeInMegabytes, DefinitionStages.WithRequiresDuplicateDetection, DefinitionStages.WithStatus, DefinitionStages.WithSupportOrdering {
+ }
+ }
+ /**
+ * The template for a SBTopic update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAutoDeleteOnIdle, UpdateStages.WithDefaultMessageTimeToLive, UpdateStages.WithDuplicateDetectionHistoryTimeWindow, UpdateStages.WithEnableBatchedOperations, UpdateStages.WithEnableExpress, UpdateStages.WithEnablePartitioning, UpdateStages.WithMaxSizeInMegabytes, UpdateStages.WithRequiresDuplicateDetection, UpdateStages.WithStatus, UpdateStages.WithSupportOrdering {
+ }
+
+ /**
+ * Grouping of SBTopic update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the sbtopic update allowing to specify AutoDeleteOnIdle.
+ */
+ interface WithAutoDeleteOnIdle {
+ /**
+ * Specifies autoDeleteOnIdle.
+ * @param autoDeleteOnIdle ISO 8601 timespan idle interval after which the topic is automatically deleted. The minimum duration is 5 minutes
+ * @return the next update stage
+ */
+ Update withAutoDeleteOnIdle(Period autoDeleteOnIdle);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify DefaultMessageTimeToLive.
+ */
+ interface WithDefaultMessageTimeToLive {
+ /**
+ * Specifies defaultMessageTimeToLive.
+ * @param defaultMessageTimeToLive ISO 8601 Default message timespan to live value. This is the duration after which the message expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not set on a message itself
+ * @return the next update stage
+ */
+ Update withDefaultMessageTimeToLive(Period defaultMessageTimeToLive);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify DuplicateDetectionHistoryTimeWindow.
+ */
+ interface WithDuplicateDetectionHistoryTimeWindow {
+ /**
+ * Specifies duplicateDetectionHistoryTimeWindow.
+ * @param duplicateDetectionHistoryTimeWindow ISO8601 timespan structure that defines the duration of the duplicate detection history. The default value is 10 minutes
+ * @return the next update stage
+ */
+ Update withDuplicateDetectionHistoryTimeWindow(Period duplicateDetectionHistoryTimeWindow);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify EnableBatchedOperations.
+ */
+ interface WithEnableBatchedOperations {
+ /**
+ * Specifies enableBatchedOperations.
+ * @param enableBatchedOperations Value that indicates whether server-side batched operations are enabled
+ * @return the next update stage
+ */
+ Update withEnableBatchedOperations(Boolean enableBatchedOperations);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify EnableExpress.
+ */
+ interface WithEnableExpress {
+ /**
+ * Specifies enableExpress.
+ * @param enableExpress Value that indicates whether Express Entities are enabled. An express topic holds a message in memory temporarily before writing it to persistent storage
+ * @return the next update stage
+ */
+ Update withEnableExpress(Boolean enableExpress);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify EnablePartitioning.
+ */
+ interface WithEnablePartitioning {
+ /**
+ * Specifies enablePartitioning.
+ * @param enablePartitioning Value that indicates whether the topic to be partitioned across multiple message brokers is enabled
+ * @return the next update stage
+ */
+ Update withEnablePartitioning(Boolean enablePartitioning);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify MaxSizeInMegabytes.
+ */
+ interface WithMaxSizeInMegabytes {
+ /**
+ * Specifies maxSizeInMegabytes.
+ * @param maxSizeInMegabytes Maximum size of the topic in megabytes, which is the size of the memory allocated for the topic. Default is 1024
+ * @return the next update stage
+ */
+ Update withMaxSizeInMegabytes(Integer maxSizeInMegabytes);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify RequiresDuplicateDetection.
+ */
+ interface WithRequiresDuplicateDetection {
+ /**
+ * Specifies requiresDuplicateDetection.
+ * @param requiresDuplicateDetection Value indicating if this topic requires duplicate detection
+ * @return the next update stage
+ */
+ Update withRequiresDuplicateDetection(Boolean requiresDuplicateDetection);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify Status.
+ */
+ interface WithStatus {
+ /**
+ * Specifies status.
+ * @param status Enumerates the possible values for the status of a messaging entity. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'
+ * @return the next update stage
+ */
+ Update withStatus(EntityStatus status);
+ }
+
+ /**
+ * The stage of the sbtopic update allowing to specify SupportOrdering.
+ */
+ interface WithSupportOrdering {
+ /**
+ * Specifies supportOrdering.
+ * @param supportOrdering Value that indicates whether the topic supports ordering
+ * @return the next update stage
+ */
+ Update withSupportOrdering(Boolean supportOrdering);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SqlFilter.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SqlFilter.java
new file mode 100644
index 000000000000..a4f52500826c
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SqlFilter.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.servicebus.v2018_01_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Represents a filter which is a composition of an expression and an action
+ * that is executed in the pub/sub pipeline.
+ */
+public class SqlFilter {
+ /**
+ * The SQL expression. e.g. MyProperty='ABC'.
+ */
+ @JsonProperty(value = "sqlExpression")
+ private String sqlExpression;
+
+ /**
+ * This property is reserved for future use. An integer value showing the
+ * compatibility level, currently hard-coded to 20.
+ */
+ @JsonProperty(value = "compatibilityLevel")
+ private Integer compatibilityLevel;
+
+ /**
+ * Value that indicates whether the rule action requires preprocessing.
+ */
+ @JsonProperty(value = "requiresPreprocessing")
+ private Boolean requiresPreprocessing;
+
+ /**
+ * Get the SQL expression. e.g. MyProperty='ABC'.
+ *
+ * @return the sqlExpression value
+ */
+ public String sqlExpression() {
+ return this.sqlExpression;
+ }
+
+ /**
+ * Set the SQL expression. e.g. MyProperty='ABC'.
+ *
+ * @param sqlExpression the sqlExpression value to set
+ * @return the SqlFilter object itself.
+ */
+ public SqlFilter withSqlExpression(String sqlExpression) {
+ this.sqlExpression = sqlExpression;
+ return this;
+ }
+
+ /**
+ * Get this property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
+ *
+ * @return the compatibilityLevel value
+ */
+ public Integer compatibilityLevel() {
+ return this.compatibilityLevel;
+ }
+
+ /**
+ * Set this property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
+ *
+ * @param compatibilityLevel the compatibilityLevel value to set
+ * @return the SqlFilter object itself.
+ */
+ public SqlFilter withCompatibilityLevel(Integer compatibilityLevel) {
+ this.compatibilityLevel = compatibilityLevel;
+ return this;
+ }
+
+ /**
+ * Get value that indicates whether the rule action requires preprocessing.
+ *
+ * @return the requiresPreprocessing value
+ */
+ public Boolean requiresPreprocessing() {
+ return this.requiresPreprocessing;
+ }
+
+ /**
+ * Set value that indicates whether the rule action requires preprocessing.
+ *
+ * @param requiresPreprocessing the requiresPreprocessing value to set
+ * @return the SqlFilter object itself.
+ */
+ public SqlFilter withRequiresPreprocessing(Boolean requiresPreprocessing) {
+ this.requiresPreprocessing = requiresPreprocessing;
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SqlRuleAction.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SqlRuleAction.java
new file mode 100644
index 000000000000..6768bf82c607
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/SqlRuleAction.java
@@ -0,0 +1,17 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+
+/**
+ * Represents set of actions written in SQL language-based syntax that is
+ * performed against a ServiceBus.Messaging.BrokeredMessage.
+ */
+public class SqlRuleAction extends Action {
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Subscriptions.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Subscriptions.java
new file mode 100644
index 000000000000..08c2aac5c56e
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Subscriptions.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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SubscriptionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Subscriptions.
+ */
+public interface Subscriptions extends SupportsCreating, HasInner {
+ /**
+ * Returns a subscription description for the specified topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @param subscriptionName The subscription name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String topicName, String subscriptionName);
+
+ /**
+ * List all the subscriptions under a specified topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByTopicAsync(final String resourceGroupName, final String namespaceName, final String topicName);
+
+ /**
+ * Deletes a subscription from the specified topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @param subscriptionName The subscription name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String topicName, String subscriptionName);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/TopicNamespaceSBAuthorizationRule.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/TopicNamespaceSBAuthorizationRule.java
new file mode 100644
index 000000000000..0787409962c8
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/TopicNamespaceSBAuthorizationRule.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.SBAuthorizationRuleInner;
+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.servicebus.v2018_01_01_preview.implementation.ServiceBusManager;
+import java.util.List;
+
+/**
+ * Type representing TopicNamespaceSBAuthorizationRule.
+ */
+public interface TopicNamespaceSBAuthorizationRule extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rights value.
+ */
+ List rights();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the TopicNamespaceSBAuthorizationRule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithTopic, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of TopicNamespaceSBAuthorizationRule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a TopicNamespaceSBAuthorizationRule definition.
+ */
+ interface Blank extends WithTopic {
+ }
+
+ /**
+ * The stage of the topicnamespacesbauthorizationrule definition allowing to specify Topic.
+ */
+ interface WithTopic {
+ /**
+ * Specifies resourceGroupName, namespaceName, topicName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The namespace name
+ * @param topicName The topic name
+ * @return the next definition stage
+ */
+ WithRights withExistingTopic(String resourceGroupName, String namespaceName, String topicName);
+ }
+
+ /**
+ * The stage of the topicnamespacesbauthorizationrule definition allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ * @param rights The rights associated with the rule
+ * @return the next definition stage
+ */
+ WithCreate withRights(List rights);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a TopicNamespaceSBAuthorizationRule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRights {
+ }
+
+ /**
+ * Grouping of TopicNamespaceSBAuthorizationRule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the topicnamespacesbauthorizationrule update allowing to specify Rights.
+ */
+ interface WithRights {
+ /**
+ * Specifies rights.
+ * @param rights The rights associated with the rule
+ * @return the next update stage
+ */
+ Update withRights(List rights);
+ }
+
+ }
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Topics.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Topics.java
new file mode 100644
index 000000000000..f5cb0da100b4
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/Topics.java
@@ -0,0 +1,121 @@
+/**
+ * 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.servicebus.v2018_01_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation.TopicsInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.TopicNamespaceSBAuthorizationRule;
+
+/**
+ * Type representing Topics.
+ */
+public interface Topics extends SupportsCreating, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ TopicNamespaceSBAuthorizationRule.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * Returns a description for the specified topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String topicName);
+
+ /**
+ * Gets all the topics 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 listByNamespaceAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes a topic from the specified namespace and resource group.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String topicName);
+
+ /**
+ * Returns the specified authorization rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic 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 topicName, String authorizationRuleName);
+
+ /**
+ * Gets authorization rules for a topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic 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 topicName);
+
+ /**
+ * Deletes a topic authorization rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic 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 topicName, String authorizationRuleName);
+
+ /**
+ * Gets the primary and secondary connection strings for the topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic 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 topicName, String authorizationRuleName);
+
+ /**
+ * Regenerates primary or secondary connection strings for the topic.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param topicName The topic name.
+ * @param authorizationRuleName The authorization rule name.
+ * @param parameters Parameters supplied to regenerate the authorization rule.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String topicName, String authorizationRuleName, RegenerateAccessKeyParameters parameters);
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/UnavailableReason.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/UnavailableReason.java
new file mode 100644
index 000000000000..9747c8e42437
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/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.servicebus.v2018_01_01_preview;
+
+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/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/AccessKeysImpl.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/AccessKeysImpl.java
new file mode 100644
index 000000000000..3b49245ac2b6
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/AccessKeysImpl.java
@@ -0,0 +1,61 @@
+/**
+ * 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.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.AccessKeys;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+
+class AccessKeysImpl extends WrapperImpl implements AccessKeys {
+ private final ServiceBusManager manager;
+ AccessKeysImpl(AccessKeysInner inner, ServiceBusManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public ServiceBusManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public String aliasPrimaryConnectionString() {
+ return this.inner().aliasPrimaryConnectionString();
+ }
+
+ @Override
+ public String aliasSecondaryConnectionString() {
+ return this.inner().aliasSecondaryConnectionString();
+ }
+
+ @Override
+ public String keyName() {
+ return this.inner().keyName();
+ }
+
+ @Override
+ public String primaryConnectionString() {
+ return this.inner().primaryConnectionString();
+ }
+
+ @Override
+ public String primaryKey() {
+ return this.inner().primaryKey();
+ }
+
+ @Override
+ public String secondaryConnectionString() {
+ return this.inner().secondaryConnectionString();
+ }
+
+ @Override
+ public String secondaryKey() {
+ return this.inner().secondaryKey();
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/AccessKeysInner.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/AccessKeysInner.java
new file mode 100644
index 000000000000..2aa209070e75
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/AccessKeysInner.java
@@ -0,0 +1,124 @@
+/**
+ * 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.servicebus.v2018_01_01_preview.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Namespace/ServiceBus Connection String.
+ */
+public class AccessKeysInner {
+ /**
+ * Primary connection string of the created namespace authorization rule.
+ */
+ @JsonProperty(value = "primaryConnectionString", access = JsonProperty.Access.WRITE_ONLY)
+ private String primaryConnectionString;
+
+ /**
+ * Secondary connection string of the created namespace authorization rule.
+ */
+ @JsonProperty(value = "secondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY)
+ private String secondaryConnectionString;
+
+ /**
+ * Primary connection string of the alias if GEO DR is enabled.
+ */
+ @JsonProperty(value = "aliasPrimaryConnectionString", access = JsonProperty.Access.WRITE_ONLY)
+ private String aliasPrimaryConnectionString;
+
+ /**
+ * Secondary connection string of the alias if GEO DR is enabled.
+ */
+ @JsonProperty(value = "aliasSecondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY)
+ private String aliasSecondaryConnectionString;
+
+ /**
+ * A base64-encoded 256-bit primary key for signing and validating the SAS
+ * token.
+ */
+ @JsonProperty(value = "primaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String primaryKey;
+
+ /**
+ * A base64-encoded 256-bit primary key for signing and validating the SAS
+ * token.
+ */
+ @JsonProperty(value = "secondaryKey", access = JsonProperty.Access.WRITE_ONLY)
+ private String secondaryKey;
+
+ /**
+ * A string that describes the authorization rule.
+ */
+ @JsonProperty(value = "keyName", access = JsonProperty.Access.WRITE_ONLY)
+ private String keyName;
+
+ /**
+ * Get primary connection string of the created namespace authorization rule.
+ *
+ * @return the primaryConnectionString value
+ */
+ public String primaryConnectionString() {
+ return this.primaryConnectionString;
+ }
+
+ /**
+ * Get secondary connection string of the created namespace authorization rule.
+ *
+ * @return the secondaryConnectionString value
+ */
+ public String secondaryConnectionString() {
+ return this.secondaryConnectionString;
+ }
+
+ /**
+ * Get primary connection string of the alias if GEO DR is enabled.
+ *
+ * @return the aliasPrimaryConnectionString value
+ */
+ public String aliasPrimaryConnectionString() {
+ return this.aliasPrimaryConnectionString;
+ }
+
+ /**
+ * Get secondary connection string of the alias if GEO DR is enabled.
+ *
+ * @return the aliasSecondaryConnectionString value
+ */
+ public String aliasSecondaryConnectionString() {
+ return this.aliasSecondaryConnectionString;
+ }
+
+ /**
+ * Get a base64-encoded 256-bit primary key for signing and validating the SAS token.
+ *
+ * @return the primaryKey value
+ */
+ public String primaryKey() {
+ return this.primaryKey;
+ }
+
+ /**
+ * Get a base64-encoded 256-bit primary key for signing and validating the SAS token.
+ *
+ * @return the secondaryKey value
+ */
+ public String secondaryKey() {
+ return this.secondaryKey;
+ }
+
+ /**
+ * Get a string that describes the authorization rule.
+ *
+ * @return the keyName value
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java
new file mode 100644
index 000000000000..fc50fa3333a9
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/ArmDisasterRecoveryImpl.java
@@ -0,0 +1,133 @@
+/**
+ * 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.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.ArmDisasterRecovery;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.ProvisioningStateDR;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.RoleDisasterRecovery;
+
+class ArmDisasterRecoveryImpl extends CreatableUpdatableImpl implements ArmDisasterRecovery, ArmDisasterRecovery.Definition, ArmDisasterRecovery.Update {
+ private final ServiceBusManager manager;
+ private String resourceGroupName;
+ private String namespaceName;
+ private String alias;
+
+ ArmDisasterRecoveryImpl(String name, ServiceBusManager manager) {
+ super(name, new ArmDisasterRecoveryInner());
+ this.manager = manager;
+ // Set resource name
+ this.alias = name;
+ //
+ }
+
+ ArmDisasterRecoveryImpl(ArmDisasterRecoveryInner inner, ServiceBusManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.alias = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces");
+ this.alias = IdParsingUtils.getValueFromIdByName(inner.id(), "disasterRecoveryConfigs");
+ //
+ }
+
+ @Override
+ public ServiceBusManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.alias, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.alias, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs();
+ return client.getAsync(this.resourceGroupName, this.namespaceName, this.alias);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public String alternateName() {
+ return this.inner().alternateName();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String partnerNamespace() {
+ return this.inner().partnerNamespace();
+ }
+
+ @Override
+ public Long pendingReplicationOperationsCount() {
+ return this.inner().pendingReplicationOperationsCount();
+ }
+
+ @Override
+ public ProvisioningStateDR provisioningState() {
+ return this.inner().provisioningState();
+ }
+
+ @Override
+ public RoleDisasterRecovery role() {
+ return this.inner().role();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public ArmDisasterRecoveryImpl withExistingNamespace(String resourceGroupName, String namespaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.namespaceName = namespaceName;
+ return this;
+ }
+
+ @Override
+ public ArmDisasterRecoveryImpl withAlternateName(String alternateName) {
+ this.inner().withAlternateName(alternateName);
+ return this;
+ }
+
+ @Override
+ public ArmDisasterRecoveryImpl withPartnerNamespace(String partnerNamespace) {
+ this.inner().withPartnerNamespace(partnerNamespace);
+ return this;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java
new file mode 100644
index 000000000000..cb3b58c3414d
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/ArmDisasterRecoveryInner.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.ProvisioningStateDR;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.RoleDisasterRecovery;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Single item in List or Get Alias(Disaster Recovery configuration) operation.
+ */
+@JsonFlatten
+public class ArmDisasterRecoveryInner extends ProxyResource {
+ /**
+ * Provisioning state of the Alias(Disaster Recovery configuration) -
+ * possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values
+ * include: 'Accepted', 'Succeeded', 'Failed'.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningStateDR provisioningState;
+
+ /**
+ * Number of entities pending to be replicated.
+ */
+ @JsonProperty(value = "properties.pendingReplicationOperationsCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Long pendingReplicationOperationsCount;
+
+ /**
+ * ARM Id of the Primary/Secondary eventhub namespace name, which is part
+ * of GEO DR pairing.
+ */
+ @JsonProperty(value = "properties.partnerNamespace")
+ private String partnerNamespace;
+
+ /**
+ * Primary/Secondary eventhub namespace name, which is part of GEO DR
+ * pairing.
+ */
+ @JsonProperty(value = "properties.alternateName")
+ private String alternateName;
+
+ /**
+ * role of namespace in GEO DR - possible values 'Primary' or
+ * 'PrimaryNotReplicating' or 'Secondary'. Possible values include:
+ * 'Primary', 'PrimaryNotReplicating', 'Secondary'.
+ */
+ @JsonProperty(value = "properties.role", access = JsonProperty.Access.WRITE_ONLY)
+ private RoleDisasterRecovery role;
+
+ /**
+ * Get provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed'.
+ *
+ * @return the provisioningState value
+ */
+ public ProvisioningStateDR provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get number of entities pending to be replicated.
+ *
+ * @return the pendingReplicationOperationsCount value
+ */
+ public Long pendingReplicationOperationsCount() {
+ return this.pendingReplicationOperationsCount;
+ }
+
+ /**
+ * Get aRM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing.
+ *
+ * @return the partnerNamespace value
+ */
+ public String partnerNamespace() {
+ return this.partnerNamespace;
+ }
+
+ /**
+ * Set aRM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing.
+ *
+ * @param partnerNamespace the partnerNamespace value to set
+ * @return the ArmDisasterRecoveryInner object itself.
+ */
+ public ArmDisasterRecoveryInner withPartnerNamespace(String partnerNamespace) {
+ this.partnerNamespace = partnerNamespace;
+ return this;
+ }
+
+ /**
+ * Get primary/Secondary eventhub namespace name, which is part of GEO DR pairing.
+ *
+ * @return the alternateName value
+ */
+ public String alternateName() {
+ return this.alternateName;
+ }
+
+ /**
+ * Set primary/Secondary eventhub namespace name, which is part of GEO DR pairing.
+ *
+ * @param alternateName the alternateName value to set
+ * @return the ArmDisasterRecoveryInner object itself.
+ */
+ public ArmDisasterRecoveryInner withAlternateName(String alternateName) {
+ this.alternateName = alternateName;
+ return this;
+ }
+
+ /**
+ * Get role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or 'Secondary'. Possible values include: 'Primary', 'PrimaryNotReplicating', 'Secondary'.
+ *
+ * @return the role value
+ */
+ public RoleDisasterRecovery role() {
+ return this.role;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/CheckNameAvailabilityResultImpl.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/CheckNameAvailabilityResultImpl.java
new file mode 100644
index 000000000000..a47025ba6c14
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/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.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.CheckNameAvailabilityResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.UnavailableReason;
+
+class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult {
+ private final ServiceBusManager manager;
+ CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, ServiceBusManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public ServiceBusManager 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/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/CheckNameAvailabilityResultInner.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/CheckNameAvailabilityResultInner.java
new file mode 100644
index 000000000000..87410f74c444
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/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.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.UnavailableReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Description of a Check Name availability request properties.
+ */
+public class CheckNameAvailabilityResultInner {
+ /**
+ * The detailed info regarding the reason associated with the namespace.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * 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;
+
+ /**
+ * Get the detailed info regarding the reason associated with the namespace.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.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;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl.java
new file mode 100644
index 000000000000..eb4724c23ee5
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl.java
@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.DisasterRecoveryConfigNamespaceSBAuthorizationRule;
+import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
+import rx.Observable;
+import java.util.List;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.AccessRights;
+
+class DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl extends IndexableRefreshableWrapperImpl implements DisasterRecoveryConfigNamespaceSBAuthorizationRule {
+ private final ServiceBusManager manager;
+ private String resourceGroupName;
+ private String namespaceName;
+ private String alias;
+ private String authorizationRuleName;
+
+ DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl(SBAuthorizationRuleInner inner, ServiceBusManager manager) {
+ super(null, inner);
+ this.manager = manager;
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces");
+ this.alias = IdParsingUtils.getValueFromIdByName(inner.id(), "disasterRecoveryConfigs");
+ this.authorizationRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "AuthorizationRules");
+ }
+
+ @Override
+ public ServiceBusManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ DisasterRecoveryConfigsInner client = this.manager().inner().disasterRecoveryConfigs();
+ return client.getAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.alias, this.authorizationRuleName);
+ }
+
+
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public List rights() {
+ return this.inner().rights();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java
new file mode 100644
index 000000000000..bed7799c785c
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigsImpl.java
@@ -0,0 +1,171 @@
+/**
+ * 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.servicebus.v2018_01_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.CheckNameAvailabilityResult;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.ArmDisasterRecovery;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.DisasterRecoveryConfigNamespaceSBAuthorizationRule;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.AccessKeys;
+
+class DisasterRecoveryConfigsImpl extends WrapperImpl implements DisasterRecoveryConfigs {
+ private final ServiceBusManager manager;
+
+ DisasterRecoveryConfigsImpl(ServiceBusManager manager) {
+ super(manager.inner().disasterRecoveryConfigs());
+ this.manager = manager;
+ }
+
+ public ServiceBusManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public ArmDisasterRecoveryImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private ArmDisasterRecoveryImpl wrapModel(ArmDisasterRecoveryInner inner) {
+ return new ArmDisasterRecoveryImpl(inner, manager());
+ }
+
+ private ArmDisasterRecoveryImpl wrapModel(String name) {
+ return new ArmDisasterRecoveryImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable checkNameAvailabilityMethodAsync(String resourceGroupName, String namespaceName, String name) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.checkNameAvailabilityMethodAsync(resourceGroupName, namespaceName, name)
+ .map(new Func1() {
+ @Override
+ public CheckNameAvailabilityResult call(CheckNameAvailabilityResultInner inner) {
+ return new CheckNameAvailabilityResultImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Completable breakPairingAsync(String resourceGroupName, String namespaceName, String alias) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.breakPairingAsync(resourceGroupName, namespaceName, alias).toCompletable();
+ }
+
+ @Override
+ public Completable failOverAsync(String resourceGroupName, String namespaceName, String alias) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.failOverAsync(resourceGroupName, namespaceName, alias).toCompletable();
+ }
+
+ @Override
+ public Observable listAsync(final String resourceGroupName, final String namespaceName) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.listAsync(resourceGroupName, namespaceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ArmDisasterRecovery call(ArmDisasterRecoveryInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String namespaceName, String alias) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.getAsync(resourceGroupName, namespaceName, alias)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(ArmDisasterRecoveryInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((ArmDisasterRecovery)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String namespaceName, String alias) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, namespaceName, alias).toCompletable();
+ }
+
+ private DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(SBAuthorizationRuleInner inner) {
+ return new DisasterRecoveryConfigNamespaceSBAuthorizationRuleImpl(inner, manager());
+ }
+
+ private Observable getSBAuthorizationRuleInnerUsingDisasterRecoveryConfigsInnerAsync(String id) {
+ String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
+ String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces");
+ String alias = IdParsingUtils.getValueFromIdByName(id, "disasterRecoveryConfigs");
+ String authorizationRuleName = IdParsingUtils.getValueFromIdByName(id, "AuthorizationRules");
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName);
+ }
+
+ @Override
+ public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(SBAuthorizationRuleInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((DisasterRecoveryConfigNamespaceSBAuthorizationRule)wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String alias) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.listAuthorizationRulesAsync(resourceGroupName, namespaceName, alias)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DisasterRecoveryConfigNamespaceSBAuthorizationRule call(SBAuthorizationRuleInner inner) {
+ return wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable listKeysAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) {
+ DisasterRecoveryConfigsInner client = this.inner();
+ return client.listKeysAsync(resourceGroupName, namespaceName, alias, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public AccessKeys call(AccessKeysInner inner) {
+ return new AccessKeysImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java
new file mode 100644
index 000000000000..2751b3aa5300
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2018_01_01_preview/src/main/java/com/microsoft/azure/management/servicebus/v2018_01_01_preview/implementation/DisasterRecoveryConfigsInner.java
@@ -0,0 +1,1338 @@
+/**
+ * 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.servicebus.v2018_01_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.CheckNameAvailability;
+import com.microsoft.azure.management.servicebus.v2018_01_01_preview.ErrorResponseException;
+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 DisasterRecoveryConfigs.
+ */
+public class DisasterRecoveryConfigsInner {
+ /** The Retrofit service to perform REST calls. */
+ private DisasterRecoveryConfigsService service;
+ /** The service client containing this operation class. */
+ private ServiceBusManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DisasterRecoveryConfigsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DisasterRecoveryConfigsInner(Retrofit retrofit, ServiceBusManagementClientImpl client) {
+ this.service = retrofit.create(DisasterRecoveryConfigsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DisasterRecoveryConfigs to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DisasterRecoveryConfigsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs checkNameAvailabilityMethod" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/CheckNameAvailability")
+ Observable> checkNameAvailabilityMethod(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailability parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs")
+ Observable> list(@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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("subscriptionId") String subscriptionId, @Body ArmDisasterRecoveryInner 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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs breakPairing" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing")
+ Observable> breakPairing(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs failOver" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover")
+ Observable> failOver(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs listAuthorizationRules" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules")
+ Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs getAuthorizationRule" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}")
+ Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("authorizationRuleName") String authorizationRuleName, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs listKeys" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/AuthorizationRules/{authorizationRuleName}/listKeys")
+ Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("alias") String alias, @Path("authorizationRuleName") String authorizationRuleName, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs listNext" })
+ @GET
+ Observable> listNext(@Url String nextUrl, @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.servicebus.v2018_01_01_preview.DisasterRecoveryConfigs listAuthorizationRulesNext" })
+ @GET
+ Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Check the give namespace name availability.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the CheckNameAvailabilityResultInner object if successful.
+ */
+ public CheckNameAvailabilityResultInner checkNameAvailabilityMethod(String resourceGroupName, String namespaceName, String name) {
+ return checkNameAvailabilityMethodWithServiceResponseAsync(resourceGroupName, namespaceName, name).toBlocking().single().body();
+ }
+
+ /**
+ * Check the give namespace name availability.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @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 checkNameAvailabilityMethodAsync(String resourceGroupName, String namespaceName, String name, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(checkNameAvailabilityMethodWithServiceResponseAsync(resourceGroupName, namespaceName, name), serviceCallback);
+ }
+
+ /**
+ * Check the give namespace name availability.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CheckNameAvailabilityResultInner object
+ */
+ public Observable checkNameAvailabilityMethodAsync(String resourceGroupName, String namespaceName, String name) {
+ return checkNameAvailabilityMethodWithServiceResponseAsync(resourceGroupName, namespaceName, name).map(new Func1, CheckNameAvailabilityResultInner>() {
+ @Override
+ public CheckNameAvailabilityResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Check the give namespace name availability.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the CheckNameAvailabilityResultInner object
+ */
+ public Observable> checkNameAvailabilityMethodWithServiceResponseAsync(String resourceGroupName, String namespaceName, String name) {
+ 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 (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (name == null) {
+ throw new IllegalArgumentException("Parameter name is required and cannot be null.");
+ }
+ final String apiVersion = "2017-04-01";
+ CheckNameAvailability parameters = new CheckNameAvailability();
+ parameters.withName(name);
+ return service.checkNameAvailabilityMethod(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = checkNameAvailabilityMethodDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse checkNameAvailabilityMethodDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations).
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException 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<ArmDisasterRecoveryInner> object if successful.
+ */
+ public PagedList list(final String resourceGroupName, final String namespaceName) {
+ ServiceResponse> response = listSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations).
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace 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> listAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listSinglePageAsync(resourceGroupName, namespaceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations).
+ *
+ * @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 to the PagedList<ArmDisasterRecoveryInner> object
+ */
+ public Observable> listAsync(final String resourceGroupName, final String namespaceName) {
+ return listWithServiceResponseAsync(resourceGroupName, namespaceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations).
+ *
+ * @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 to the PagedList<ArmDisasterRecoveryInner> object
+ */
+ public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) {
+ return listSinglePageAsync(resourceGroupName, namespaceName)
+ .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(listNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets all Alias(Disaster Recovery configurations).
+ *
+ ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ ServiceResponse> * @param namespaceName The namespace name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ArmDisasterRecoveryInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listSinglePageAsync(final String resourceGroupName, final String namespaceName) {
+ 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 (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ final String apiVersion = "2017-04-01";
+ return service.list(resourceGroupName, namespaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listDelegate(Response