diff --git a/relay/resource-manager/v2016_07_01/pom.xml b/relay/resource-manager/v2016_07_01/pom.xml
new file mode 100644
index 000000000000..6e0a44f7fbb8
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/pom.xml
@@ -0,0 +1,133 @@
+
+
+ 4.0.0
+ com.microsoft.azure.relay.v2016_07_01
+
+ com.microsoft.azure
+ azure-arm-parent
+ 0.0.3-beta
+ ../../../pom.xml
+
+ azure-mgmt-relay
+ 1.0.0-beta
+ jar
+ Microsoft Azure SDK for Relay Management
+ This package contains Microsoft Relay Management SDK.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+
+
+ junit
+ junit
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ test
+
+
+ com.microsoft.azure
+ azure-mgmt-resources
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ test-jar
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+
* Copyright (c) Microsoft Corporation. All rights reserved.
+
* Licensed under the MIT License. See License.txt in the project root for
+
* license information.
+
*/
+ ]]>
+
+
+
+
+
+
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/AccessRights.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/AccessRights.java
new file mode 100644
index 000000000000..700db6f062ab
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/AccessRights.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.relay.v2016_07_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for AccessRights.
+ */
+public final class AccessRights extends ExpandableStringEnum {
+ /** Static value Manage for AccessRights. */
+ public static final AccessRights MANAGE = fromString("Manage");
+
+ /** Static value Send for AccessRights. */
+ public static final AccessRights SEND = fromString("Send");
+
+ /** Static value Listen for AccessRights. */
+ public static final AccessRights LISTEN = fromString("Listen");
+
+ /**
+ * Creates or finds a AccessRights from its string representation.
+ * @param name a name to look for
+ * @return the corresponding AccessRights
+ */
+ @JsonCreator
+ public static AccessRights fromString(String name) {
+ return fromString(name, AccessRights.class);
+ }
+
+ /**
+ * @return known AccessRights values
+ */
+ public static Collection values() {
+ return values(AccessRights.class);
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/AuthorizationRuleKeys.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/AuthorizationRuleKeys.java
new file mode 100644
index 000000000000..a0efece87380
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/AuthorizationRuleKeys.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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.RelayManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.AuthorizationRuleKeysInner;
+
+/**
+ * Type representing AuthorizationRuleKeys.
+ */
+public interface AuthorizationRuleKeys extends HasInner, HasManager {
+ /**
+ * @return the keyName value.
+ */
+ String keyName();
+
+ /**
+ * @return the primaryConnectionString value.
+ */
+ String primaryConnectionString();
+
+ /**
+ * @return the primaryKey value.
+ */
+ String primaryKey();
+
+ /**
+ * @return the secondaryConnectionString value.
+ */
+ String secondaryConnectionString();
+
+ /**
+ * @return the secondaryKey value.
+ */
+ String secondaryKey();
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/CheckNameAvailability.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/CheckNameAvailability.java
new file mode 100644
index 000000000000..16f169816c43
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/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.relay.v2016_07_01;
+
+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/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/CheckNameAvailabilityResult.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/CheckNameAvailabilityResult.java
new file mode 100644
index 000000000000..ea3d36738f25
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/CheckNameAvailabilityResult.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.RelayManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.CheckNameAvailabilityResultInner;
+
+/**
+ * Type representing CheckNameAvailabilityResult.
+ */
+public interface CheckNameAvailabilityResult extends HasInner, HasManager {
+ /**
+ * @return the message value.
+ */
+ String message();
+
+ /**
+ * @return the nameAvailable value.
+ */
+ Boolean nameAvailable();
+
+ /**
+ * @return the reason value.
+ */
+ UnavailableReason reason();
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/ErrorResponse.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/ErrorResponse.java
new file mode 100644
index 000000000000..2f455cc72997
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/ErrorResponse.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.relay.v2016_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Error response indicates Relay service is not able to process the incoming
+ * request. The reason is provided in the error message.
+ */
+public class ErrorResponse {
+ /**
+ * Error code.
+ */
+ @JsonProperty(value = "code")
+ private String code;
+
+ /**
+ * 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.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set error message indicating why the operation failed.
+ *
+ * @param message the message value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/ErrorResponseException.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/ErrorResponseException.java
new file mode 100644
index 000000000000..b10dbab28e2f
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/ErrorResponseException.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.relay.v2016_07_01;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnection.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnection.java
new file mode 100644
index 000000000000..8532e3787d27
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnection.java
@@ -0,0 +1,162 @@
+/**
+ * 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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.HybridConnectionInner;
+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.relay.v2016_07_01.implementation.RelayManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing HybridConnection.
+ */
+public interface HybridConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the listenerCount value.
+ */
+ Integer listenerCount();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the requiresClientAuthorization value.
+ */
+ Boolean requiresClientAuthorization();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * @return the userMetadata value.
+ */
+ String userMetadata();
+
+ /**
+ * The entirety of the HybridConnection definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of HybridConnection definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a HybridConnection definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the hybridconnection 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 hybridconnection definition allowing to specify RequiresClientAuthorization.
+ */
+ interface WithRequiresClientAuthorization {
+ /**
+ * Specifies requiresClientAuthorization.
+ * @param requiresClientAuthorization true if client authorization is needed for this HybridConnection; otherwise, false
+ * @return the next definition stage
+ */
+ WithCreate withRequiresClientAuthorization(Boolean requiresClientAuthorization);
+ }
+
+ /**
+ * The stage of the hybridconnection definition allowing to specify UserMetadata.
+ */
+ interface WithUserMetadata {
+ /**
+ * Specifies userMetadata.
+ * @param userMetadata userMetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored
+ * @return the next definition stage
+ */
+ WithCreate withUserMetadata(String userMetadata);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithRequiresClientAuthorization, DefinitionStages.WithUserMetadata {
+ }
+ }
+ /**
+ * The template for a HybridConnection update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRequiresClientAuthorization, UpdateStages.WithUserMetadata {
+ }
+
+ /**
+ * Grouping of HybridConnection update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the hybridconnection update allowing to specify RequiresClientAuthorization.
+ */
+ interface WithRequiresClientAuthorization {
+ /**
+ * Specifies requiresClientAuthorization.
+ * @param requiresClientAuthorization true if client authorization is needed for this HybridConnection; otherwise, false
+ * @return the next update stage
+ */
+ Update withRequiresClientAuthorization(Boolean requiresClientAuthorization);
+ }
+
+ /**
+ * The stage of the hybridconnection update allowing to specify UserMetadata.
+ */
+ interface WithUserMetadata {
+ /**
+ * Specifies userMetadata.
+ * @param userMetadata userMetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored
+ * @return the next update stage
+ */
+ Update withUserMetadata(String userMetadata);
+ }
+
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnectionNamespaceAuthorizationRule.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnectionNamespaceAuthorizationRule.java
new file mode 100644
index 000000000000..4562f29f5623
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnectionNamespaceAuthorizationRule.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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.AuthorizationRuleInner;
+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.relay.v2016_07_01.implementation.RelayManager;
+import java.util.List;
+
+/**
+ * Type representing HybridConnectionNamespaceAuthorizationRule.
+ */
+public interface HybridConnectionNamespaceAuthorizationRule 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 HybridConnectionNamespaceAuthorizationRule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithHybridConnection, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of HybridConnectionNamespaceAuthorizationRule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a HybridConnectionNamespaceAuthorizationRule definition.
+ */
+ interface Blank extends WithHybridConnection {
+ }
+
+ /**
+ * The stage of the hybridconnectionnamespaceauthorizationrule definition allowing to specify HybridConnection.
+ */
+ interface WithHybridConnection {
+ /**
+ * Specifies resourceGroupName, namespaceName, hybridConnectionName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name
+ * @return the next definition stage
+ */
+ WithRights withExistingHybridConnection(String resourceGroupName, String namespaceName, String hybridConnectionName);
+ }
+
+ /**
+ * The stage of the hybridconnectionnamespaceauthorizationrule 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 HybridConnectionNamespaceAuthorizationRule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRights {
+ }
+
+ /**
+ * Grouping of HybridConnectionNamespaceAuthorizationRule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the hybridconnectionnamespaceauthorizationrule 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/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnections.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnections.java
new file mode 100644
index 000000000000..6d6e2d9ac8c2
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/HybridConnections.java
@@ -0,0 +1,143 @@
+/**
+ * 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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.HybridConnectionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.HybridConnectionNamespaceAuthorizationRule;
+
+/**
+ * Type representing HybridConnections.
+ */
+public interface HybridConnections extends SupportsCreating, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ HybridConnectionNamespaceAuthorizationRule.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * Authorization rules for a HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listPostAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName);
+
+ /**
+ * Returns the description for the specified HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String hybridConnectionName);
+
+ /**
+ * Lists the HybridConnection within the 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 HybridConnection .
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName);
+
+ /**
+ * HybridConnection authorizationRule for a HybridConnection by name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName);
+
+ /**
+ * Authorization rules for a HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection 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 hybridConnectionName);
+
+ /**
+ * Deletes a HybridConnection authorization rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName);
+
+ /**
+ * HybridConnection authorizationRule for a HybridConnection by name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable postAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName);
+
+ /**
+ * Primary and Secondary ConnectionStrings to the HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName);
+
+ /**
+ * Regenerates the Primary or Secondary ConnectionStrings to the HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName);
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/NamespaceAuthorizationRule.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/NamespaceAuthorizationRule.java
new file mode 100644
index 000000000000..507fafa126db
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/NamespaceAuthorizationRule.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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.AuthorizationRuleInner;
+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.relay.v2016_07_01.implementation.RelayManager;
+import java.util.List;
+
+/**
+ * Type representing NamespaceAuthorizationRule.
+ */
+public interface NamespaceAuthorizationRule 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 NamespaceAuthorizationRule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of NamespaceAuthorizationRule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a NamespaceAuthorizationRule definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the namespaceauthorizationrule 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 namespaceauthorizationrule 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 NamespaceAuthorizationRule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRights {
+ }
+
+ /**
+ * Grouping of NamespaceAuthorizationRule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the namespaceauthorizationrule 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/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Namespaces.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Namespaces.java
new file mode 100644
index 000000000000..18ef4b9238d0
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Namespaces.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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.NamespacesInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.NamespaceAuthorizationRule;
+import rx.Completable;
+
+/**
+ * Type representing Namespaces.
+ */
+public interface Namespaces extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ NamespaceAuthorizationRule.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * 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 listPostAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Check the give namespace name availability.
+ *
+ * @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 name);
+
+ /**
+ * Authorization rule for a namespace by name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+ /**
+ * Authorization rules for a namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName);
+
+ /**
+ * Deletes a namespace authorization rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+ /**
+ * Authorization rule for a namespace by name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable postAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+ /**
+ * Primary and Secondary ConnectionStrings to the namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param authorizationRuleName The authorizationRule 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 ConnectionStrings to the namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName);
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Operation.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Operation.java
new file mode 100644
index 000000000000..9db01b25f90b
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Operation.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.RelayManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.OperationInner;
+
+/**
+ * Type representing Operation.
+ */
+public interface Operation extends HasInner, HasManager {
+ /**
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/OperationDisplay.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/OperationDisplay.java
new file mode 100644
index 000000000000..62519dda49c9
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/OperationDisplay.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The object that represents the operation.
+ */
+public class OperationDisplay {
+ /**
+ * Service provider: Microsoft.EventHub.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private String provider;
+
+ /**
+ * Resource on which the operation is performed: Invoice, etc.
+ */
+ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY)
+ private String resource;
+
+ /**
+ * Operation type: Read, write, delete, etc.
+ */
+ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY)
+ private String operation;
+
+ /**
+ * Get service provider: Microsoft.EventHub.
+ *
+ * @return the provider value
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get resource on which the operation is performed: Invoice, etc.
+ *
+ * @return the resource value
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get operation type: Read, write, delete, etc.
+ *
+ * @return the operation value
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Operations.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Operations.java
new file mode 100644
index 000000000000..13efcc3f7753
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Operations.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import rx.Observable;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.OperationsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Operations.
+ */
+public interface Operations extends HasInner {
+ /**
+ * Lists all of the available Relay REST API operations.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/PolicyKey.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/PolicyKey.java
new file mode 100644
index 000000000000..9fb7164abf6f
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/PolicyKey.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PolicyKey.
+ */
+public final class PolicyKey extends ExpandableStringEnum {
+ /** Static value PrimaryKey for PolicyKey. */
+ public static final PolicyKey PRIMARY_KEY = fromString("PrimaryKey");
+
+ /** Static value SecondaryKey for PolicyKey. */
+ public static final PolicyKey SECONDARY_KEY = fromString("SecondaryKey");
+
+ /**
+ * Creates or finds a PolicyKey from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PolicyKey
+ */
+ @JsonCreator
+ public static PolicyKey fromString(String name) {
+ return fromString(name, PolicyKey.class);
+ }
+
+ /**
+ * @return known PolicyKey values
+ */
+ public static Collection values() {
+ return values(PolicyKey.class);
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RegenerateKeysParameters.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RegenerateKeysParameters.java
new file mode 100644
index 000000000000..3c76a4bc394f
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RegenerateKeysParameters.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters supplied to the Regenerate Authorization Rule operation.
+ */
+public class RegenerateKeysParameters {
+ /**
+ * Key that needs to be regenerated. Possible values include: 'PrimaryKey',
+ * 'SecondaryKey'.
+ */
+ @JsonProperty(value = "policyKey")
+ private PolicyKey policyKey;
+
+ /**
+ * Get key that needs to be regenerated. Possible values include: 'PrimaryKey', 'SecondaryKey'.
+ *
+ * @return the policyKey value
+ */
+ public PolicyKey policyKey() {
+ return this.policyKey;
+ }
+
+ /**
+ * Set key that needs to be regenerated. Possible values include: 'PrimaryKey', 'SecondaryKey'.
+ *
+ * @param policyKey the policyKey value to set
+ * @return the RegenerateKeysParameters object itself.
+ */
+ public RegenerateKeysParameters withPolicyKey(PolicyKey policyKey) {
+ this.policyKey = policyKey;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RelayNamespace.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RelayNamespace.java
new file mode 100644
index 000000000000..80a42e2ed939
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RelayNamespace.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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.RelayManager;
+import java.util.Map;
+import org.joda.time.DateTime;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.RelayNamespaceInner;
+
+/**
+ * Type representing RelayNamespace.
+ */
+public interface RelayNamespace extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the metricId value.
+ */
+ String metricId();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the serviceBusEndpoint value.
+ */
+ String serviceBusEndpoint();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * The entirety of the RelayNamespace definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of RelayNamespace definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a RelayNamespace definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the RelayNamespace definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the relaynamespace definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku Sku of the Namespace
+ * @return the next definition stage
+ */
+ WithCreate withSku(Sku sku);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithSku {
+ }
+ }
+ /**
+ * The template for a RelayNamespace update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithTags {
+ }
+
+ /**
+ * Grouping of RelayNamespace update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the relaynamespace update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RelayNamespaceUpdateParameter.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RelayNamespaceUpdateParameter.java
new file mode 100644
index 000000000000..d520b2be4065
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/RelayNamespaceUpdateParameter.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Parameters supplied to the Patch Namespace operation.
+ */
+public class RelayNamespaceUpdateParameter {
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * The sku of the created namespace.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * Creates an instance of RelayNamespaceUpdateParameter class.
+ */
+ public RelayNamespaceUpdateParameter() {
+ sku = new Sku();
+ }
+
+ /**
+ * Get resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the RelayNamespaceUpdateParameter object itself.
+ */
+ public RelayNamespaceUpdateParameter withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the sku of the created namespace.
+ *
+ * @return the sku value
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku of the created namespace.
+ *
+ * @param sku the sku value to set
+ * @return the RelayNamespaceUpdateParameter object itself.
+ */
+ public RelayNamespaceUpdateParameter withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Relaytype.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Relaytype.java
new file mode 100644
index 000000000000..d7186ce5d4b7
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Relaytype.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for Relaytype.
+ */
+public final class Relaytype extends ExpandableStringEnum {
+ /** Static value NetTcp for Relaytype. */
+ public static final Relaytype NET_TCP = fromString("NetTcp");
+
+ /** Static value Http for Relaytype. */
+ public static final Relaytype HTTP = fromString("Http");
+
+ /**
+ * Creates or finds a Relaytype from its string representation.
+ * @param name a name to look for
+ * @return the corresponding Relaytype
+ */
+ @JsonCreator
+ public static Relaytype fromString(String name) {
+ return fromString(name, Relaytype.class);
+ }
+
+ /**
+ * @return known Relaytype values
+ */
+ public static Collection values() {
+ return values(Relaytype.class);
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Sku.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Sku.java
new file mode 100644
index 000000000000..db71f4ed3f15
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/Sku.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Sku of the Namespace.
+ */
+public class Sku {
+ /**
+ * Name of this Sku.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The tier of this particular SKU.
+ */
+ @JsonProperty(value = "tier", required = true)
+ private String tier;
+
+ /**
+ * Creates an instance of Sku class.
+ */
+ public Sku() {
+ name = "Standard";
+ tier = "Standard";
+ }
+
+ /**
+ * Get name of this Sku.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set name of this Sku.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the tier of this particular SKU.
+ *
+ * @return the tier value
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the tier of this particular SKU.
+ *
+ * @param tier the tier value to set
+ * @return the Sku object itself.
+ */
+ public Sku withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/UnavailableReason.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/UnavailableReason.java
new file mode 100644
index 000000000000..e648e2a4f08b
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/UnavailableReason.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for UnavailableReason.
+ */
+public enum UnavailableReason {
+ /** Enum value None. */
+ NONE("None"),
+
+ /** Enum value InvalidName. */
+ INVALID_NAME("InvalidName"),
+
+ /** Enum value SubscriptionIsDisabled. */
+ SUBSCRIPTION_IS_DISABLED("SubscriptionIsDisabled"),
+
+ /** Enum value NameInUse. */
+ NAME_IN_USE("NameInUse"),
+
+ /** Enum value NameInLockdown. */
+ NAME_IN_LOCKDOWN("NameInLockdown"),
+
+ /** Enum value TooManyNamespaceInCurrentSubscription. */
+ TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION("TooManyNamespaceInCurrentSubscription");
+
+ /** The actual serialized value for a UnavailableReason instance. */
+ private String value;
+
+ UnavailableReason(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a UnavailableReason instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed UnavailableReason object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static UnavailableReason fromString(String value) {
+ UnavailableReason[] items = UnavailableReason.values();
+ for (UnavailableReason item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WCFRelays.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WCFRelays.java
new file mode 100644
index 000000000000..3fac4319842c
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WCFRelays.java
@@ -0,0 +1,143 @@
+/**
+ * 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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.WCFRelaysInner;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.WcfRelayNamespaceAuthorizationRule;
+
+/**
+ * Type representing WCFRelays.
+ */
+public interface WCFRelays extends SupportsCreating, HasInner {
+ /**
+ * Begins definition for a new AuthorizationRule resource.
+ * @param name resource name.
+ * @return the first stage of the new AuthorizationRule definition.
+ */
+ WcfRelayNamespaceAuthorizationRule.DefinitionStages.Blank defineAuthorizationRule(String name);
+
+ /**
+ * Authorization rules for a WCFRelays.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listPostAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String relayName);
+
+ /**
+ * Returns the description for the specified WCFRelays.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String namespaceName, String relayName);
+
+ /**
+ * Lists the WCFRelays within the 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 WCFRelays .
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String namespaceName, String relayName);
+
+ /**
+ * Get authorizationRule for a WCFRelays by name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName);
+
+ /**
+ * Authorization rules for a WCFRelays.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay 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 relayName);
+
+ /**
+ * Deletes a WCFRelays authorization rule.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName);
+
+ /**
+ * Get authorizationRule for a WCFRelays by name.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable postAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName);
+
+ /**
+ * Primary and Secondary ConnectionStrings to the WCFRelays.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listKeysAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName);
+
+ /**
+ * Regenerates the Primary or Secondary ConnectionStrings to the WCFRelays.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @param authorizationRuleName The authorizationRule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String relayName, String authorizationRuleName);
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WcfRelay.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WcfRelay.java
new file mode 100644
index 000000000000..1d6276a3d3d9
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WcfRelay.java
@@ -0,0 +1,225 @@
+/**
+ * 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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.WcfRelayInner;
+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.relay.v2016_07_01.implementation.RelayManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing WcfRelay.
+ */
+public interface WcfRelay extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the createdAt value.
+ */
+ DateTime createdAt();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the isDynamic value.
+ */
+ Boolean isDynamic();
+
+ /**
+ * @return the listenerCount value.
+ */
+ Integer listenerCount();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the relayType value.
+ */
+ Relaytype relayType();
+
+ /**
+ * @return the requiresClientAuthorization value.
+ */
+ Boolean requiresClientAuthorization();
+
+ /**
+ * @return the requiresTransportSecurity value.
+ */
+ Boolean requiresTransportSecurity();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the updatedAt value.
+ */
+ DateTime updatedAt();
+
+ /**
+ * @return the userMetadata value.
+ */
+ String userMetadata();
+
+ /**
+ * The entirety of the WcfRelay definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNamespace, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of WcfRelay definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a WcfRelay definition.
+ */
+ interface Blank extends WithNamespace {
+ }
+
+ /**
+ * The stage of the wcfrelay 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 wcfrelay definition allowing to specify RelayType.
+ */
+ interface WithRelayType {
+ /**
+ * Specifies relayType.
+ * @param relayType WCFRelay Type. Possible values include: 'NetTcp', 'Http'
+ * @return the next definition stage
+ */
+ WithCreate withRelayType(Relaytype relayType);
+ }
+
+ /**
+ * The stage of the wcfrelay definition allowing to specify RequiresClientAuthorization.
+ */
+ interface WithRequiresClientAuthorization {
+ /**
+ * Specifies requiresClientAuthorization.
+ * @param requiresClientAuthorization true if client authorization is needed for this relay; otherwise, false
+ * @return the next definition stage
+ */
+ WithCreate withRequiresClientAuthorization(Boolean requiresClientAuthorization);
+ }
+
+ /**
+ * The stage of the wcfrelay definition allowing to specify RequiresTransportSecurity.
+ */
+ interface WithRequiresTransportSecurity {
+ /**
+ * Specifies requiresTransportSecurity.
+ * @param requiresTransportSecurity true if transport security is needed for this relay; otherwise, false
+ * @return the next definition stage
+ */
+ WithCreate withRequiresTransportSecurity(Boolean requiresTransportSecurity);
+ }
+
+ /**
+ * The stage of the wcfrelay definition allowing to specify UserMetadata.
+ */
+ interface WithUserMetadata {
+ /**
+ * Specifies userMetadata.
+ * @param userMetadata userMetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored
+ * @return the next definition stage
+ */
+ WithCreate withUserMetadata(String userMetadata);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithRelayType, DefinitionStages.WithRequiresClientAuthorization, DefinitionStages.WithRequiresTransportSecurity, DefinitionStages.WithUserMetadata {
+ }
+ }
+ /**
+ * The template for a WcfRelay update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRelayType, UpdateStages.WithRequiresClientAuthorization, UpdateStages.WithRequiresTransportSecurity, UpdateStages.WithUserMetadata {
+ }
+
+ /**
+ * Grouping of WcfRelay update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the wcfrelay update allowing to specify RelayType.
+ */
+ interface WithRelayType {
+ /**
+ * Specifies relayType.
+ * @param relayType WCFRelay Type. Possible values include: 'NetTcp', 'Http'
+ * @return the next update stage
+ */
+ Update withRelayType(Relaytype relayType);
+ }
+
+ /**
+ * The stage of the wcfrelay update allowing to specify RequiresClientAuthorization.
+ */
+ interface WithRequiresClientAuthorization {
+ /**
+ * Specifies requiresClientAuthorization.
+ * @param requiresClientAuthorization true if client authorization is needed for this relay; otherwise, false
+ * @return the next update stage
+ */
+ Update withRequiresClientAuthorization(Boolean requiresClientAuthorization);
+ }
+
+ /**
+ * The stage of the wcfrelay update allowing to specify RequiresTransportSecurity.
+ */
+ interface WithRequiresTransportSecurity {
+ /**
+ * Specifies requiresTransportSecurity.
+ * @param requiresTransportSecurity true if transport security is needed for this relay; otherwise, false
+ * @return the next update stage
+ */
+ Update withRequiresTransportSecurity(Boolean requiresTransportSecurity);
+ }
+
+ /**
+ * The stage of the wcfrelay update allowing to specify UserMetadata.
+ */
+ interface WithUserMetadata {
+ /**
+ * Specifies userMetadata.
+ * @param userMetadata userMetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored
+ * @return the next update stage
+ */
+ Update withUserMetadata(String userMetadata);
+ }
+
+ }
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WcfRelayNamespaceAuthorizationRule.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WcfRelayNamespaceAuthorizationRule.java
new file mode 100644
index 000000000000..6077d5c1cc20
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/WcfRelayNamespaceAuthorizationRule.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.relay.v2016_07_01;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.relay.v2016_07_01.implementation.AuthorizationRuleInner;
+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.relay.v2016_07_01.implementation.RelayManager;
+import java.util.List;
+
+/**
+ * Type representing WcfRelayNamespaceAuthorizationRule.
+ */
+public interface WcfRelayNamespaceAuthorizationRule 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 WcfRelayNamespaceAuthorizationRule definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithWcfRelay, DefinitionStages.WithRights, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of WcfRelayNamespaceAuthorizationRule definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a WcfRelayNamespaceAuthorizationRule definition.
+ */
+ interface Blank extends WithWcfRelay {
+ }
+
+ /**
+ * The stage of the wcfrelaynamespaceauthorizationrule definition allowing to specify WcfRelay.
+ */
+ interface WithWcfRelay {
+ /**
+ * Specifies resourceGroupName, namespaceName, relayName.
+ * @param resourceGroupName Name of the Resource group within the Azure subscription
+ * @param namespaceName The Namespace Name
+ * @param relayName The relay name
+ * @return the next definition stage
+ */
+ WithRights withExistingWcfRelay(String resourceGroupName, String namespaceName, String relayName);
+ }
+
+ /**
+ * The stage of the wcfrelaynamespaceauthorizationrule 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 WcfRelayNamespaceAuthorizationRule update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRights {
+ }
+
+ /**
+ * Grouping of WcfRelayNamespaceAuthorizationRule update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the wcfrelaynamespaceauthorizationrule 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/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleInner.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleInner.java
new file mode 100644
index 000000000000..ab8c5eb7780a
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleInner.java
@@ -0,0 +1,48 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import java.util.List;
+import com.microsoft.azure.management.relay.v2016_07_01.AccessRights;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Description of a Namespace AuthorizationRules.
+ */
+@JsonFlatten
+public class AuthorizationRuleInner extends ProxyResource {
+ /**
+ * The rights associated with the rule.
+ */
+ @JsonProperty(value = "properties.rights", required = true)
+ private List rights;
+
+ /**
+ * Get the rights associated with the rule.
+ *
+ * @return the rights value
+ */
+ public List rights() {
+ return this.rights;
+ }
+
+ /**
+ * Set the rights associated with the rule.
+ *
+ * @param rights the rights value to set
+ * @return the AuthorizationRuleInner object itself.
+ */
+ public AuthorizationRuleInner withRights(List rights) {
+ this.rights = rights;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleKeysImpl.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleKeysImpl.java
new file mode 100644
index 000000000000..be4a2e939d46
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleKeysImpl.java
@@ -0,0 +1,51 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import com.microsoft.azure.management.relay.v2016_07_01.AuthorizationRuleKeys;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+
+class AuthorizationRuleKeysImpl extends WrapperImpl implements AuthorizationRuleKeys {
+ private final RelayManager manager;
+ AuthorizationRuleKeysImpl(AuthorizationRuleKeysInner inner, RelayManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public RelayManager manager() {
+ return this.manager;
+ }
+
+ @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/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleKeysInner.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleKeysInner.java
new file mode 100644
index 000000000000..3ccdb12ea86c
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/AuthorizationRuleKeysInner.java
@@ -0,0 +1,149 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Namespace/Relay Connection String.
+ */
+public class AuthorizationRuleKeysInner {
+ /**
+ * PrimaryConnectionString of the created Namespace AuthorizationRule.
+ */
+ @JsonProperty(value = "primaryConnectionString")
+ private String primaryConnectionString;
+
+ /**
+ * SecondaryConnectionString of the created Namespace AuthorizationRule.
+ */
+ @JsonProperty(value = "secondaryConnectionString")
+ private String secondaryConnectionString;
+
+ /**
+ * A base64-encoded 256-bit primary key for signing and validating the SAS
+ * token.
+ */
+ @JsonProperty(value = "primaryKey")
+ private String primaryKey;
+
+ /**
+ * A base64-encoded 256-bit secondary key for signing and validating the
+ * SAS token.
+ */
+ @JsonProperty(value = "secondaryKey")
+ private String secondaryKey;
+
+ /**
+ * A string that describes the authorization rule.
+ */
+ @JsonProperty(value = "keyName")
+ private String keyName;
+
+ /**
+ * Get primaryConnectionString of the created Namespace AuthorizationRule.
+ *
+ * @return the primaryConnectionString value
+ */
+ public String primaryConnectionString() {
+ return this.primaryConnectionString;
+ }
+
+ /**
+ * Set primaryConnectionString of the created Namespace AuthorizationRule.
+ *
+ * @param primaryConnectionString the primaryConnectionString value to set
+ * @return the AuthorizationRuleKeysInner object itself.
+ */
+ public AuthorizationRuleKeysInner withPrimaryConnectionString(String primaryConnectionString) {
+ this.primaryConnectionString = primaryConnectionString;
+ return this;
+ }
+
+ /**
+ * Get secondaryConnectionString of the created Namespace AuthorizationRule.
+ *
+ * @return the secondaryConnectionString value
+ */
+ public String secondaryConnectionString() {
+ return this.secondaryConnectionString;
+ }
+
+ /**
+ * Set secondaryConnectionString of the created Namespace AuthorizationRule.
+ *
+ * @param secondaryConnectionString the secondaryConnectionString value to set
+ * @return the AuthorizationRuleKeysInner object itself.
+ */
+ public AuthorizationRuleKeysInner withSecondaryConnectionString(String secondaryConnectionString) {
+ this.secondaryConnectionString = secondaryConnectionString;
+ return this;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Set a base64-encoded 256-bit primary key for signing and validating the SAS token.
+ *
+ * @param primaryKey the primaryKey value to set
+ * @return the AuthorizationRuleKeysInner object itself.
+ */
+ public AuthorizationRuleKeysInner withPrimaryKey(String primaryKey) {
+ this.primaryKey = primaryKey;
+ return this;
+ }
+
+ /**
+ * Get a base64-encoded 256-bit secondary key for signing and validating the SAS token.
+ *
+ * @return the secondaryKey value
+ */
+ public String secondaryKey() {
+ return this.secondaryKey;
+ }
+
+ /**
+ * Set a base64-encoded 256-bit secondary key for signing and validating the SAS token.
+ *
+ * @param secondaryKey the secondaryKey value to set
+ * @return the AuthorizationRuleKeysInner object itself.
+ */
+ public AuthorizationRuleKeysInner withSecondaryKey(String secondaryKey) {
+ this.secondaryKey = secondaryKey;
+ return this;
+ }
+
+ /**
+ * Get a string that describes the authorization rule.
+ *
+ * @return the keyName value
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set a string that describes the authorization rule.
+ *
+ * @param keyName the keyName value to set
+ * @return the AuthorizationRuleKeysInner object itself.
+ */
+ public AuthorizationRuleKeysInner withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/CheckNameAvailabilityResultImpl.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/CheckNameAvailabilityResultImpl.java
new file mode 100644
index 000000000000..353e30b9a1a3
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/CheckNameAvailabilityResultImpl.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01.implementation;
+
+import com.microsoft.azure.management.relay.v2016_07_01.CheckNameAvailabilityResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.relay.v2016_07_01.UnavailableReason;
+
+class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult {
+ private final RelayManager manager;
+ CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, RelayManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public RelayManager 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/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/CheckNameAvailabilityResultInner.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/CheckNameAvailabilityResultInner.java
new file mode 100644
index 000000000000..78aa138ab219
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/CheckNameAvailabilityResultInner.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01.implementation;
+
+import com.microsoft.azure.management.relay.v2016_07_01.UnavailableReason;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Description of a Check Name availability request properties.
+ */
+public class CheckNameAvailabilityResultInner {
+ /**
+ * Value indicating namespace is availability, true if the namespace is
+ * available; otherwise, false.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /**
+ * The reason for unavailability of a namespace. Possible values include:
+ * 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse',
+ * 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'.
+ */
+ @JsonProperty(value = "reason")
+ private UnavailableReason reason;
+
+ /**
+ * The detailed info regarding the reason associated with the namespace.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * Get value indicating namespace is availability, true if the namespace is available; otherwise, false.
+ *
+ * @return the nameAvailable value
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set value indicating namespace is availability, true if the namespace is available; otherwise, false.
+ *
+ * @param nameAvailable the nameAvailable value to set
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the reason for unavailability of a namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'.
+ *
+ * @return the reason value
+ */
+ public UnavailableReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason for unavailability of a namespace. Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled', 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'.
+ *
+ * @param reason the reason value to set
+ * @return the CheckNameAvailabilityResultInner object itself.
+ */
+ public CheckNameAvailabilityResultInner withReason(UnavailableReason reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the detailed info regarding the reason associated with the namespace.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionImpl.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionImpl.java
new file mode 100644
index 000000000000..4c15239b9bc1
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionImpl.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.relay.v2016_07_01.implementation;
+
+import com.microsoft.azure.management.relay.v2016_07_01.HybridConnection;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import org.joda.time.DateTime;
+
+class HybridConnectionImpl extends CreatableUpdatableImpl implements HybridConnection, HybridConnection.Definition, HybridConnection.Update {
+ private final RelayManager manager;
+ private String resourceGroupName;
+ private String namespaceName;
+ private String hybridConnectionName;
+
+ HybridConnectionImpl(String name, RelayManager manager) {
+ super(name, new HybridConnectionInner());
+ this.manager = manager;
+ // Set resource name
+ this.hybridConnectionName = name;
+ //
+ }
+
+ HybridConnectionImpl(HybridConnectionInner inner, RelayManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.hybridConnectionName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces");
+ this.hybridConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "HybridConnections");
+ //
+ }
+
+ @Override
+ public RelayManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ HybridConnectionsInner client = this.manager().inner().hybridConnections();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.hybridConnectionName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ HybridConnectionsInner client = this.manager().inner().hybridConnections();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.namespaceName, this.hybridConnectionName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ HybridConnectionsInner client = this.manager().inner().hybridConnections();
+ return client.getAsync(this.resourceGroupName, this.namespaceName, this.hybridConnectionName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public DateTime createdAt() {
+ return this.inner().createdAt();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public Integer listenerCount() {
+ return this.inner().listenerCount();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public Boolean requiresClientAuthorization() {
+ return this.inner().requiresClientAuthorization();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DateTime updatedAt() {
+ return this.inner().updatedAt();
+ }
+
+ @Override
+ public String userMetadata() {
+ return this.inner().userMetadata();
+ }
+
+ @Override
+ public HybridConnectionImpl withExistingNamespace(String resourceGroupName, String namespaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.namespaceName = namespaceName;
+ return this;
+ }
+
+ @Override
+ public HybridConnectionImpl withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
+ this.inner().withRequiresClientAuthorization(requiresClientAuthorization);
+ return this;
+ }
+
+ @Override
+ public HybridConnectionImpl withUserMetadata(String userMetadata) {
+ this.inner().withUserMetadata(userMetadata);
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionInner.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionInner.java
new file mode 100644
index 000000000000..095f6f7f9bc3
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionInner.java
@@ -0,0 +1,123 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * Description of HybridConnection Resource.
+ */
+@JsonFlatten
+public class HybridConnectionInner extends ProxyResource {
+ /**
+ * The time the HybridConnection was created.
+ */
+ @JsonProperty(value = "properties.createdAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime createdAt;
+
+ /**
+ * The time the namespace was updated.
+ */
+ @JsonProperty(value = "properties.updatedAt", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime updatedAt;
+
+ /**
+ * The number of listeners for this HybridConnection. min : 1 and max:25
+ * supported.
+ */
+ @JsonProperty(value = "properties.listenerCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer listenerCount;
+
+ /**
+ * true if client authorization is needed for this HybridConnection;
+ * otherwise, false.
+ */
+ @JsonProperty(value = "properties.requiresClientAuthorization")
+ private Boolean requiresClientAuthorization;
+
+ /**
+ * userMetadata is a placeholder to store user-defined string data for the
+ * HybridConnection endpoint.e.g. it can be used to store descriptive
+ * data, such as list of teams and their contact information also
+ * user-defined configuration settings can be stored.
+ */
+ @JsonProperty(value = "properties.userMetadata")
+ private String userMetadata;
+
+ /**
+ * Get the time the HybridConnection was created.
+ *
+ * @return the createdAt value
+ */
+ public DateTime createdAt() {
+ return this.createdAt;
+ }
+
+ /**
+ * Get the time the namespace was updated.
+ *
+ * @return the updatedAt value
+ */
+ public DateTime updatedAt() {
+ return this.updatedAt;
+ }
+
+ /**
+ * Get the number of listeners for this HybridConnection. min : 1 and max:25 supported.
+ *
+ * @return the listenerCount value
+ */
+ public Integer listenerCount() {
+ return this.listenerCount;
+ }
+
+ /**
+ * Get true if client authorization is needed for this HybridConnection; otherwise, false.
+ *
+ * @return the requiresClientAuthorization value
+ */
+ public Boolean requiresClientAuthorization() {
+ return this.requiresClientAuthorization;
+ }
+
+ /**
+ * Set true if client authorization is needed for this HybridConnection; otherwise, false.
+ *
+ * @param requiresClientAuthorization the requiresClientAuthorization value to set
+ * @return the HybridConnectionInner object itself.
+ */
+ public HybridConnectionInner withRequiresClientAuthorization(Boolean requiresClientAuthorization) {
+ this.requiresClientAuthorization = requiresClientAuthorization;
+ return this;
+ }
+
+ /**
+ * Get userMetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
+ *
+ * @return the userMetadata value
+ */
+ public String userMetadata() {
+ return this.userMetadata;
+ }
+
+ /**
+ * Set userMetadata is a placeholder to store user-defined string data for the HybridConnection endpoint.e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
+ *
+ * @param userMetadata the userMetadata value to set
+ * @return the HybridConnectionInner object itself.
+ */
+ public HybridConnectionInner withUserMetadata(String userMetadata) {
+ this.userMetadata = userMetadata;
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionNamespaceAuthorizationRuleImpl.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionNamespaceAuthorizationRuleImpl.java
new file mode 100644
index 000000000000..fda5e5c64edf
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionNamespaceAuthorizationRuleImpl.java
@@ -0,0 +1,116 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import com.microsoft.azure.management.relay.v2016_07_01.HybridConnectionNamespaceAuthorizationRule;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import java.util.List;
+import com.microsoft.azure.management.relay.v2016_07_01.AccessRights;
+
+class HybridConnectionNamespaceAuthorizationRuleImpl extends CreatableUpdatableImpl implements HybridConnectionNamespaceAuthorizationRule, HybridConnectionNamespaceAuthorizationRule.Definition, HybridConnectionNamespaceAuthorizationRule.Update {
+ private final RelayManager manager;
+ private String resourceGroupName;
+ private String namespaceName;
+ private String hybridConnectionName;
+ private String authorizationRuleName;
+ private List crights;
+ private List urights;
+
+ HybridConnectionNamespaceAuthorizationRuleImpl(String name, RelayManager manager) {
+ super(name, new AuthorizationRuleInner());
+ this.manager = manager;
+ // Set resource name
+ this.authorizationRuleName = name;
+ //
+ }
+
+ HybridConnectionNamespaceAuthorizationRuleImpl(AuthorizationRuleInner inner, RelayManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.authorizationRuleName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.namespaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "namespaces");
+ this.hybridConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "HybridConnections");
+ this.authorizationRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "authorizationRules");
+ //
+ }
+
+ @Override
+ public RelayManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ HybridConnectionsInner client = this.manager().inner().hybridConnections();
+ return client.createOrUpdateAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.hybridConnectionName, this.authorizationRuleName, this.crights)
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ HybridConnectionsInner client = this.manager().inner().hybridConnections();
+ return client.createOrUpdateAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.hybridConnectionName, this.authorizationRuleName, this.urights)
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ HybridConnectionsInner client = this.manager().inner().hybridConnections();
+ return client.getAuthorizationRuleAsync(this.resourceGroupName, this.namespaceName, this.hybridConnectionName, this.authorizationRuleName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @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();
+ }
+
+ @Override
+ public HybridConnectionNamespaceAuthorizationRuleImpl withExistingHybridConnection(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ this.resourceGroupName = resourceGroupName;
+ this.namespaceName = namespaceName;
+ this.hybridConnectionName = hybridConnectionName;
+ return this;
+ }
+
+ @Override
+ public HybridConnectionNamespaceAuthorizationRuleImpl withRights(List rights) {
+ if (isInCreateMode()) {
+ this.crights = rights;
+ } else {
+ this.urights = rights;
+ }
+ return this;
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionsImpl.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionsImpl.java
new file mode 100644
index 000000000000..9b5b4e2ed4c9
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionsImpl.java
@@ -0,0 +1,196 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.relay.v2016_07_01.HybridConnections;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.relay.v2016_07_01.NamespaceAuthorizationRule;
+import com.microsoft.azure.management.relay.v2016_07_01.HybridConnection;
+import com.microsoft.azure.management.relay.v2016_07_01.HybridConnectionNamespaceAuthorizationRule;
+import com.microsoft.azure.management.relay.v2016_07_01.AuthorizationRuleKeys;
+
+class HybridConnectionsImpl extends WrapperImpl implements HybridConnections {
+ private final RelayManager manager;
+
+ HybridConnectionsImpl(RelayManager manager) {
+ super(manager.inner().hybridConnections());
+ this.manager = manager;
+ }
+
+ public RelayManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public HybridConnectionImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private HybridConnectionImpl wrapModel(HybridConnectionInner inner) {
+ return new HybridConnectionImpl(inner, manager());
+ }
+
+ private HybridConnectionImpl wrapModel(String name) {
+ return new HybridConnectionImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listPostAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) {
+ HybridConnectionsInner client = this.inner();
+ return client.listPostAuthorizationRulesAsync(resourceGroupName, namespaceName, hybridConnectionName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public NamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
+ return new NamespaceAuthorizationRuleImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listByNamespaceAsync(final String resourceGroupName, final String namespaceName) {
+ HybridConnectionsInner client = this.inner();
+ return client.listByNamespaceAsync(resourceGroupName, namespaceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public HybridConnection call(HybridConnectionInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ HybridConnectionsInner client = this.inner();
+ return client.getAsync(resourceGroupName, namespaceName, hybridConnectionName)
+ .map(new Func1() {
+ @Override
+ public HybridConnection call(HybridConnectionInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ HybridConnectionsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, namespaceName, hybridConnectionName).toCompletable();
+ }
+
+ @Override
+ public HybridConnectionNamespaceAuthorizationRuleImpl defineAuthorizationRule(String name) {
+ return wrapAuthorizationRuleModel(name);
+ }
+
+ private HybridConnectionNamespaceAuthorizationRuleImpl wrapAuthorizationRuleModel(String name) {
+ return new HybridConnectionNamespaceAuthorizationRuleImpl(name, this.manager());
+ }
+
+ private HybridConnectionNamespaceAuthorizationRuleImpl wrapHybridConnectionNamespaceAuthorizationRuleModel(AuthorizationRuleInner inner) {
+ return new HybridConnectionNamespaceAuthorizationRuleImpl(inner, manager());
+ }
+
+ private Observable getAuthorizationRuleInnerUsingHybridConnectionsInnerAsync(String id) {
+ String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
+ String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces");
+ String hybridConnectionName = IdParsingUtils.getValueFromIdByName(id, "HybridConnections");
+ String authorizationRuleName = IdParsingUtils.getValueFromIdByName(id, "authorizationRules");
+ HybridConnectionsInner client = this.inner();
+ return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName);
+ }
+
+ @Override
+ public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) {
+ HybridConnectionsInner client = this.inner();
+ return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public HybridConnectionNamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
+ return wrapHybridConnectionNamespaceAuthorizationRuleModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) {
+ HybridConnectionsInner client = this.inner();
+ return client.listAuthorizationRulesAsync(resourceGroupName, namespaceName, hybridConnectionName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public HybridConnectionNamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
+ return wrapHybridConnectionNamespaceAuthorizationRuleModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) {
+ HybridConnectionsInner client = this.inner();
+ return client.deleteAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName).toCompletable();
+ }
+
+ @Override
+ public Observable postAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) {
+ HybridConnectionsInner client = this.inner();
+ return client.postAuthorizationRuleAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public NamespaceAuthorizationRule call(AuthorizationRuleInner inner) {
+ return new NamespaceAuthorizationRuleImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) {
+ HybridConnectionsInner client = this.inner();
+ return client.listKeysAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public AuthorizationRuleKeys call(AuthorizationRuleKeysInner inner) {
+ return new AuthorizationRuleKeysImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable regenerateKeysAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, String authorizationRuleName) {
+ HybridConnectionsInner client = this.inner();
+ return client.regenerateKeysAsync(resourceGroupName, namespaceName, hybridConnectionName, authorizationRuleName)
+ .map(new Func1() {
+ @Override
+ public AuthorizationRuleKeys call(AuthorizationRuleKeysInner inner) {
+ return new AuthorizationRuleKeysImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionsInner.java b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionsInner.java
new file mode 100644
index 000000000000..e5214b25566d
--- /dev/null
+++ b/relay/resource-manager/v2016_07_01/src/main/java/com/microsoft/azure/management/relay/v2016_07_01/implementation/HybridConnectionsInner.java
@@ -0,0 +1,1848 @@
+/**
+ * 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.relay.v2016_07_01.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.management.relay.v2016_07_01.AccessRights;
+import com.microsoft.azure.management.relay.v2016_07_01.ErrorResponseException;
+import com.microsoft.azure.management.relay.v2016_07_01.PolicyKey;
+import com.microsoft.azure.management.relay.v2016_07_01.RegenerateKeysParameters;
+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 HybridConnections.
+ */
+public class HybridConnectionsInner {
+ /** The Retrofit service to perform REST calls. */
+ private HybridConnectionsService service;
+ /** The service client containing this operation class. */
+ private RelayManagementClientImpl client;
+
+ /**
+ * Initializes an instance of HybridConnectionsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public HybridConnectionsInner(Retrofit retrofit, RelayManagementClientImpl client) {
+ this.service = retrofit.create(HybridConnectionsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HybridConnections to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface HybridConnectionsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.v2016_07_01.HybridConnections listByNamespace" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections")
+ Observable> listByNamespace(@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.relay.v2016_07_01.HybridConnections createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("subscriptionId") String subscriptionId, @Body HybridConnectionInner 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.relay.v2016_07_01.HybridConnections delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections listAuthorizationRules" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules")
+ Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections listPostAuthorizationRules" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules")
+ Observable> listPostAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections createOrUpdateAuthorizationRule" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}")
+ Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.v2016_07_01.HybridConnections deleteAuthorizationRule" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true)
+ Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections getAuthorizationRule" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}")
+ Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections postAuthorizationRule" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}")
+ Observable> postAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections listKeys" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/ListKeys")
+ Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @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.relay.v2016_07_01.HybridConnections regenerateKeys" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys")
+ Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("hybridConnectionName") String hybridConnectionName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body RegenerateKeysParameters parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.relay.v2016_07_01.HybridConnections listByNamespaceNext" })
+ @GET
+ Observable> listByNamespaceNext(@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.relay.v2016_07_01.HybridConnections listAuthorizationRulesNext" })
+ @GET
+ Observable> listAuthorizationRulesNext(@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.relay.v2016_07_01.HybridConnections listPostAuthorizationRulesNext" })
+ @GET
+ Observable> listPostAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists the HybridConnection within the 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
+ * @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<HybridConnectionInner> object if successful.
+ */
+ public PagedList listByNamespace(final String resourceGroupName, final String namespaceName) {
+ ServiceResponse> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the HybridConnection within the namespace.
+ *
+ * @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> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByNamespaceSinglePageAsync(resourceGroupName, namespaceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByNamespaceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the HybridConnection within the 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 to the PagedList<HybridConnectionInner> object
+ */
+ public Observable> listByNamespaceAsync(final String resourceGroupName, final String namespaceName) {
+ return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the HybridConnection within the 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 to the PagedList<HybridConnectionInner> object
+ */
+ public Observable>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) {
+ return listByNamespaceSinglePageAsync(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(listByNamespaceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the HybridConnection within the namespace.
+ *
+ 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<HybridConnectionInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByNamespaceSinglePageAsync(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.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByNamespaceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByNamespaceDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates or Updates a service HybridConnection. This operation is idempotent.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param parameters Parameters supplied to create a HybridConnection.
+ * @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 HybridConnectionInner object if successful.
+ */
+ public HybridConnectionInner createOrUpdate(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Creates or Updates a service HybridConnection. This operation is idempotent.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param parameters Parameters supplied to create a HybridConnection.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters), serviceCallback);
+ }
+
+ /**
+ * Creates or Updates a service HybridConnection. This operation is idempotent.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param parameters Parameters supplied to create a HybridConnection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the HybridConnectionInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName, parameters).map(new Func1, HybridConnectionInner>() {
+ @Override
+ public HybridConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or Updates a service HybridConnection. This operation is idempotent.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param parameters Parameters supplied to create a HybridConnection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the HybridConnectionInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, HybridConnectionInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (namespaceName == null) {
+ throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null.");
+ }
+ if (hybridConnectionName == null) {
+ throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ return service.createOrUpdate(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes a HybridConnection .
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection 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
+ */
+ public void delete(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ deleteWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes a HybridConnection .
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName), serviceCallback);
+ }
+
+ /**
+ * Deletes a HybridConnection .
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes a HybridConnection .
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ 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 (hybridConnectionName == null) {
+ throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.delete(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Returns the description for the specified HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection 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 HybridConnectionInner object if successful.
+ */
+ public HybridConnectionInner get(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ return getWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Returns the description for the specified HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String namespaceName, String hybridConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName), serviceCallback);
+ }
+
+ /**
+ * Returns the description for the specified HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the HybridConnectionInner object
+ */
+ public Observable getAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ return getWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName).map(new Func1, HybridConnectionInner>() {
+ @Override
+ public HybridConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Returns the description for the specified HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the HybridConnectionInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String hybridConnectionName) {
+ 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 (hybridConnectionName == null) {
+ throw new IllegalArgumentException("Parameter hybridConnectionName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(resourceGroupName, namespaceName, hybridConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ /**
+ * Authorization rules for a HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<AuthorizationRuleInner> object if successful.
+ */
+ public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) {
+ ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, hybridConnectionName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Authorization rules for a HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection 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> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, hybridConnectionName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listAuthorizationRulesNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Authorization rules for a HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AuthorizationRuleInner> object
+ */
+ public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String hybridConnectionName) {
+ return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, hybridConnectionName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Authorization rules for a HybridConnection.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The Namespace Name
+ * @param hybridConnectionName The hybrid connection name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<AuthorizationRuleInner> object
+ */
+ public Observable