diff --git a/sdk/servicebus/mgmt-v2017_04_01/pom.xml b/sdk/servicebus/mgmt-v2017_04_01/pom.xml
index 7b00002800b0..29c6060d5338 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/pom.xml
+++ b/sdk/servicebus/mgmt-v2017_04_01/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
azure-mgmt-servicebus
1.0.0-beta
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorAdditionalInfo.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorAdditionalInfo.java
new file mode 100644
index 000000000000..50098dbee33b
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorAdditionalInfo.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2017_04_01;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The resource management error additional info.
+ */
+public class ErrorAdditionalInfo {
+ /**
+ * The additional info type.
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private String type;
+
+ /**
+ * The additional info.
+ */
+ @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY)
+ private Object info;
+
+ /**
+ * Get the additional info type.
+ *
+ * @return the type value
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the additional info.
+ *
+ * @return the info value
+ */
+ public Object info() {
+ return this.info;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponse.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponse.java
index f276989db507..4190cc71b63c 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponse.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponse.java
@@ -11,59 +11,32 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Error response indicates ServiceBus service is not able to process the
- * incoming request. The reason is provided in the error message.
+ * The resource management error response.
*/
public class ErrorResponse {
/**
- * Error code.
+ * The error object.
*/
- @JsonProperty(value = "code")
- private String code;
+ @JsonProperty(value = "error")
+ private ErrorResponseError error;
/**
- * Error message indicating why the operation failed.
- */
- @JsonProperty(value = "message")
- private String message;
-
- /**
- * Get error code.
- *
- * @return the code value
- */
- public String code() {
- return this.code;
- }
-
- /**
- * Set error code.
- *
- * @param code the code value to set
- * @return the ErrorResponse object itself.
- */
- public ErrorResponse withCode(String code) {
- this.code = code;
- return this;
- }
-
- /**
- * Get error message indicating why the operation failed.
+ * Get the error object.
*
- * @return the message value
+ * @return the error value
*/
- public String message() {
- return this.message;
+ public ErrorResponseError error() {
+ return this.error;
}
/**
- * Set error message indicating why the operation failed.
+ * Set the error object.
*
- * @param message the message value to set
+ * @param error the error value to set
* @return the ErrorResponse object itself.
*/
- public ErrorResponse withMessage(String message) {
- this.message = message;
+ public ErrorResponse withError(ErrorResponseError error) {
+ this.error = error;
return this;
}
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponseError.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponseError.java
new file mode 100644
index 000000000000..77a928038357
--- /dev/null
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ErrorResponseError.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.servicebus.v2017_04_01;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The error object.
+ */
+public class ErrorResponseError {
+ /**
+ * The error code.
+ */
+ @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY)
+ private String code;
+
+ /**
+ * The error message.
+ */
+ @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
+ private String message;
+
+ /**
+ * The error target.
+ */
+ @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY)
+ private String target;
+
+ /**
+ * The error details.
+ */
+ @JsonProperty(value = "details", access = JsonProperty.Access.WRITE_ONLY)
+ private List details;
+
+ /**
+ * The error additional info.
+ */
+ @JsonProperty(value = "additionalInfo", access = JsonProperty.Access.WRITE_ONLY)
+ private List additionalInfo;
+
+ /**
+ * Get the error code.
+ *
+ * @return the code value
+ */
+ public String code() {
+ return this.code;
+ }
+
+ /**
+ * Get the error message.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Get the error target.
+ *
+ * @return the target value
+ */
+ public String target() {
+ return this.target;
+ }
+
+ /**
+ * Get the error details.
+ *
+ * @return the details value
+ */
+ public List details() {
+ return this.details;
+ }
+
+ /**
+ * Get the error additional info.
+ *
+ * @return the additionalInfo value
+ */
+ public List additionalInfo() {
+ return this.additionalInfo;
+ }
+
+}
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/Namespaces.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/Namespaces.java
index 53a1692d1da7..85164d19e4d8 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/Namespaces.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/Namespaces.java
@@ -19,6 +19,7 @@
import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.NamespacesInner;
import com.microsoft.azure.arm.model.HasInner;
import com.microsoft.azure.management.servicebus.v2017_04_01.NamespaceSBAuthorizationRule;
+import com.microsoft.azure.management.servicebus.v2017_04_01.NetworkRuleSet;
import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.NetworkRuleSetInner;
/**
@@ -107,6 +108,16 @@ public interface Namespaces extends SupportsCreating regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters);
+ /**
+ * Gets list of NetworkRuleSet for a Namespace.
+ *
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listNetworkRuleSetsAsync(final String resourceGroupName, final String namespaceName);
+
/**
* Create or update NetworkRuleSet for a Namespace.
*
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/NetworkRuleSet.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/NetworkRuleSet.java
index e38c0cc505ff..530fb26328bc 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/NetworkRuleSet.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/NetworkRuleSet.java
@@ -9,9 +9,9 @@
package com.microsoft.azure.management.servicebus.v2017_04_01;
import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.NetworkRuleSetInner;
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.ServiceBusManager;
-import com.microsoft.azure.management.servicebus.v2017_04_01.implementation.NetworkRuleSetInner;
import java.util.List;
/**
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ResourceNamespacePatch.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ResourceNamespacePatch.java
index 25e7281a3056..d1072bc13bd1 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ResourceNamespacePatch.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/ResourceNamespacePatch.java
@@ -8,11 +8,64 @@
package com.microsoft.azure.management.servicebus.v2017_04_01;
-import com.microsoft.azure.Resource;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
/**
* The Resource definition.
*/
-public class ResourceNamespacePatch extends Resource {
+public class ResourceNamespacePatch extends ProxyResource {
+ /**
+ * Resource location.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get resource location.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set resource location.
+ *
+ * @param location the location value to set
+ * @return the ResourceNamespacePatch object itself.
+ */
+ public ResourceNamespacePatch withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * 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 ResourceNamespacePatch object itself.
+ */
+ public ResourceNamespacePatch withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
}
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/SqlFilter.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/SqlFilter.java
index a917c1821c4f..ac0a9021ba14 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/SqlFilter.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/SqlFilter.java
@@ -25,7 +25,7 @@ public class SqlFilter {
* This property is reserved for future use. An integer value showing the
* compatibility level, currently hard-coded to 20.
*/
- @JsonProperty(value = "compatibilityLevel", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonProperty(value = "compatibilityLevel")
private Integer compatibilityLevel;
/**
@@ -63,6 +63,17 @@ public Integer compatibilityLevel() {
return this.compatibilityLevel;
}
+ /**
+ * Set this property is reserved for future use. An integer value showing the compatibility level, currently hard-coded to 20.
+ *
+ * @param compatibilityLevel the compatibilityLevel value to set
+ * @return the SqlFilter object itself.
+ */
+ public SqlFilter withCompatibilityLevel(Integer compatibilityLevel) {
+ this.compatibilityLevel = compatibilityLevel;
+ return this;
+ }
+
/**
* Get value that indicates whether the rule action requires preprocessing.
*
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/DisasterRecoveryConfigsImpl.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/DisasterRecoveryConfigsImpl.java
index d1e32adbb74f..0522b355e330 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/DisasterRecoveryConfigsImpl.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/DisasterRecoveryConfigsImpl.java
@@ -91,10 +91,14 @@ public ArmDisasterRecovery call(ArmDisasterRecoveryInner inner) {
public Observable getAsync(String resourceGroupName, String namespaceName, String alias) {
DisasterRecoveryConfigsInner client = this.inner();
return client.getAsync(resourceGroupName, namespaceName, alias)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public ArmDisasterRecovery call(ArmDisasterRecoveryInner inner) {
- return wrapModel(inner);
+ public Observable call(ArmDisasterRecoveryInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((ArmDisasterRecovery)wrapModel(inner));
+ }
}
});
}
@@ -122,10 +126,14 @@ private Observable getSBAuthorizationRuleInnerUsingDis
public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String alias, String authorizationRuleName) {
DisasterRecoveryConfigsInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, alias, authorizationRuleName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public DisasterRecoveryConfigNamespaceSBAuthorizationRule call(SBAuthorizationRuleInner inner) {
- return wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(inner);
+ public Observable call(SBAuthorizationRuleInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((DisasterRecoveryConfigNamespaceSBAuthorizationRule)wrapDisasterRecoveryConfigNamespaceSBAuthorizationRuleModel(inner));
+ }
}
});
}
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/EventhubInner.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/EventhubInner.java
index 7dc88e4caa44..f559f36aa899 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/EventhubInner.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/EventhubInner.java
@@ -54,7 +54,7 @@ public class EventhubInner extends ProxyResource {
private Long partitionCount;
/**
- * Enumerates the possible values for the status of the Event Hub. Possible
+ * Enumerates the possible values for the status of a Event Hub. Possible
* values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled',
* 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
*/
@@ -135,7 +135,7 @@ public EventhubInner withPartitionCount(Long partitionCount) {
}
/**
- * Get enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ * Get enumerates the possible values for the status of a Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
*
* @return the status value
*/
@@ -144,7 +144,7 @@ public EntityStatus status() {
}
/**
- * Set enumerates the possible values for the status of the Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
+ * Set enumerates the possible values for the status of a Event Hub. Possible values include: 'Active', 'Disabled', 'Restoring', 'SendDisabled', 'ReceiveDisabled', 'Creating', 'Deleting', 'Renaming', 'Unknown'.
*
* @param status the status value to set
* @return the EventhubInner object itself.
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/MigrationConfigsImpl.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/MigrationConfigsImpl.java
index 53b139e8bcaa..c17e8ca21c90 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/MigrationConfigsImpl.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/MigrationConfigsImpl.java
@@ -76,10 +76,14 @@ public MigrationConfigProperties call(MigrationConfigPropertiesInner inner) {
public Observable getAsync(String resourceGroupName, String namespaceName) {
MigrationConfigsInner client = this.inner();
return client.getAsync(resourceGroupName, namespaceName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public MigrationConfigProperties call(MigrationConfigPropertiesInner inner) {
- return wrapModel(inner);
+ public Observable call(MigrationConfigPropertiesInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((MigrationConfigProperties)wrapModel(inner));
+ }
}
});
}
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesImpl.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesImpl.java
index a3d14e72a7b3..91e98b609eb9 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesImpl.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesImpl.java
@@ -172,6 +172,10 @@ private NamespaceSBAuthorizationRuleImpl wrapNamespaceSBAuthorizationRuleModel(S
return new NamespaceSBAuthorizationRuleImpl(inner, manager());
}
+ private NetworkRuleSetImpl wrapNetworkRuleSetModel(NetworkRuleSetInner inner) {
+ return new NetworkRuleSetImpl(inner, manager());
+ }
+
private Observable getSBAuthorizationRuleInnerUsingNamespacesInnerAsync(String id) {
String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
String namespaceName = IdParsingUtils.getValueFromIdByName(id, "namespaces");
@@ -184,10 +188,14 @@ private Observable getSBAuthorizationRuleInnerUsingNam
public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
NamespacesInner client = this.inner();
return client.getAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleName)
- .map(new Func1() {
+ .flatMap(new Func1>() {
@Override
- public NamespaceSBAuthorizationRule call(SBAuthorizationRuleInner inner) {
- return wrapNamespaceSBAuthorizationRuleModel(inner);
+ public Observable call(SBAuthorizationRuleInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((NamespaceSBAuthorizationRule)wrapNamespaceSBAuthorizationRuleModel(inner));
+ }
}
});
}
@@ -240,6 +248,24 @@ public AccessKeys call(AccessKeysInner inner) {
});
}
+ @Override
+ public Observable listNetworkRuleSetsAsync(final String resourceGroupName, final String namespaceName) {
+ NamespacesInner client = this.inner();
+ return client.listNetworkRuleSetsAsync(resourceGroupName, namespaceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public NetworkRuleSet call(NetworkRuleSetInner inner) {
+ return wrapNetworkRuleSetModel(inner);
+ }
+ });
+ }
+
@Override
public Observable createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) {
NamespacesInner client = this.inner();
diff --git a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesInner.java b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesInner.java
index 9ccdbb2c48dc..33f72a2019e1 100644
--- a/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesInner.java
+++ b/sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/NamespacesInner.java
@@ -72,10 +72,38 @@ public NamespacesInner(Retrofit retrofit, ServiceBusManagementClientImpl client)
* used by Retrofit to perform actually REST calls.
*/
interface NamespacesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listAuthorizationRules" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules")
+ Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces createOrUpdateAuthorizationRule" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
+ Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SBAuthorizationRuleInner parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces deleteAuthorizationRule" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true)
+ Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces getAuthorizationRule" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
+ Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listKeys" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys")
+ Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces regenerateKeys" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys")
+ Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces checkNameAvailabilityMethod" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability")
Observable> checkNameAvailabilityMethod(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailability parameters, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces migrate" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrate")
+ Observable> migrate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SBNamespaceMigrate parameters, @Header("User-Agent") String userAgent);
+
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces")
Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -108,34 +136,6 @@ interface NamespacesService {
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}")
Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body SBNamespaceUpdateParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listAuthorizationRules" })
- @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules")
- Observable> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces createOrUpdateAuthorizationRule" })
- @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
- Observable> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SBAuthorizationRuleInner parameters, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces deleteAuthorizationRule" })
- @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true)
- Observable> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces getAuthorizationRule" })
- @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
- Observable> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listKeys" })
- @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys")
- Observable> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces regenerateKeys" })
- @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys")
- Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces migrate" })
- @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/migrate")
- Observable> migrate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SBNamespaceMigrate parameters, @Header("User-Agent") String userAgent);
-
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces createOrUpdateNetworkRuleSet" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default")
Observable> createOrUpdateNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body NetworkRuleSetInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -144,6 +144,14 @@ interface NamespacesService {
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets/default")
Observable> getNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listNetworkRuleSets" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/networkRuleSets")
+ Observable> listNetworkRuleSets(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces 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.servicebus.v2017_04_01.Namespaces listNext" })
@GET
Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@@ -152,79 +160,121 @@ interface NamespacesService {
@GET
Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listAuthorizationRulesNext" })
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.servicebus.v2017_04_01.Namespaces listNetworkRuleSetsNext" })
@GET
- Observable> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+ Observable> listNetworkRuleSetsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
/**
- * Check the give namespace name availability.
+ * Gets the authorization rules for a namespace.
*
- * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @param 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 CheckNameAvailabilityResultInner object if successful.
+ * @return the PagedList<SBAuthorizationRuleInner> object if successful.
*/
- public CheckNameAvailabilityResultInner checkNameAvailabilityMethod(String name) {
- return checkNameAvailabilityMethodWithServiceResponseAsync(name).toBlocking().single().body();
+ public PagedList listAuthorizationRules(final String resourceGroupName, final String namespaceName) {
+ ServiceResponse> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
}
/**
- * Check the give namespace name availability.
+ * Gets the authorization rules for a namespace.
*
- * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @param 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 checkNameAvailabilityMethodAsync(String name, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(checkNameAvailabilityMethodWithServiceResponseAsync(name), serviceCallback);
+ public ServiceFuture> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listAuthorizationRulesNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
}
/**
- * Check the give namespace name availability.
+ * Gets the authorization rules for a namespace.
*
- * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @param 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 CheckNameAvailabilityResultInner object
+ * @return the observable to the PagedList<SBAuthorizationRuleInner> object
*/
- public Observable checkNameAvailabilityMethodAsync(String name) {
- return checkNameAvailabilityMethodWithServiceResponseAsync(name).map(new Func1, CheckNameAvailabilityResultInner>() {
- @Override
- public CheckNameAvailabilityResultInner call(ServiceResponse response) {
- return response.body();
- }
- });
+ public Observable> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName) {
+ return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
}
/**
- * Check the give namespace name availability.
+ * Gets the authorization rules for a namespace.
*
- * @param name The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.
+ * @param 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 CheckNameAvailabilityResultInner object
+ * @return the observable to the PagedList<SBAuthorizationRuleInner> object
*/
- public Observable> checkNameAvailabilityMethodWithServiceResponseAsync(String name) {
+ public Observable>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) {
+ return listAuthorizationRulesSinglePageAsync(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(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets the authorization rules for a 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<SBAuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listAuthorizationRulesSinglePageAsync(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.");
}
- if (name == null) {
- throw new IllegalArgumentException("Parameter name is required and cannot be null.");
- }
- CheckNameAvailability parameters = new CheckNameAvailability();
- parameters.withName(name);
- return service.checkNameAvailabilityMethod(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ return service.listAuthorizationRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
@Override
- public Observable> call(Response response) {
+ public Observable>> call(Response response) {
try {
- ServiceResponse clientResponse = checkNameAvailabilityMethodDelegate(response);
- return Observable.just(clientResponse);
+ ServiceResponse> result = listAuthorizationRulesDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
@@ -232,106 +282,102 @@ public Observable> call(Respon
});
}
- private ServiceResponse checkNameAvailabilityMethodDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
+ private ServiceResponse> listAuthorizationRulesDelegate(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);
}
/**
- * Gets all the available namespaces within the subscription, irrespective of the resource groups.
+ * Creates or updates an authorization rule for a namespace.
*
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @param rights The rights associated with the rule.
* @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<SBNamespaceInner> object if successful.
+ * @return the SBAuthorizationRuleInner object if successful.
*/
- public PagedList list() {
- ServiceResponse> response = listSinglePageAsync().toBlocking().single();
- return new PagedList(response.body()) {
- @Override
- public Page nextPage(String nextPageLink) {
- return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
- }
- };
+ public SBAuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) {
+ return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).toBlocking().single().body();
}
/**
- * Gets all the available namespaces within the subscription, irrespective of the resource groups.
+ * Creates or updates an authorization rule for a namespace.
*
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @param rights The rights associated with the rule.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) {
- return AzureServiceFuture.fromPageResponse(
- listSinglePageAsync(),
- new Func1>>>() {
- @Override
- public Observable>> call(String nextPageLink) {
- return listNextSinglePageAsync(nextPageLink);
- }
- },
- serviceCallback);
- }
-
- /**
- * Gets all the available namespaces within the subscription, irrespective of the resource groups.
- *
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the PagedList<SBNamespaceInner> object
- */
- public Observable> listAsync() {
- return listWithServiceResponseAsync()
- .map(new Func1>, Page>() {
- @Override
- public Page call(ServiceResponse> response) {
- return response.body();
- }
- });
+ public ServiceFuture createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights), serviceCallback);
}
/**
- * Gets all the available namespaces within the subscription, irrespective of the resource groups.
+ * Creates or updates an authorization rule for a namespace.
*
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @param rights The rights associated with the rule.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the PagedList<SBNamespaceInner> object
+ * @return the observable to the SBAuthorizationRuleInner object
*/
- public Observable>> listWithServiceResponseAsync() {
- return listSinglePageAsync()
- .concatMap(new Func1>, Observable>>>() {
- @Override
- public Observable>> call(ServiceResponse> page) {
- String nextPageLink = page.body().nextPageLink();
- if (nextPageLink == null) {
- return Observable.just(page);
- }
- return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
- }
- });
+ public Observable createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) {
+ return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).map(new Func1, SBAuthorizationRuleInner>() {
+ @Override
+ public SBAuthorizationRuleInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
}
/**
- * Gets all the available namespaces within the subscription, irrespective of the resource groups.
+ * Creates or updates an authorization rule for a namespace.
*
+ * @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
+ * @param rights The rights associated with the rule.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the PagedList<SBNamespaceInner> object wrapped in {@link ServiceResponse} if successful.
+ * @return the observable to the SBAuthorizationRuleInner object
*/
- public Observable>> listSinglePageAsync() {
+ public Observable> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List rights) {
+ 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 (authorizationRuleName == null) {
+ throw new IllegalArgumentException("Parameter authorizationRuleName 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.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>>() {
+ if (rights == null) {
+ throw new IllegalArgumentException("Parameter rights is required and cannot be null.");
+ }
+ Validator.validate(rights);
+ SBAuthorizationRuleInner parameters = new SBAuthorizationRuleInner();
+ parameters.withRights(rights);
+ return service.createOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable>> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse> result = listDelegate(response);
- return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ ServiceResponse clientResponse = createOrUpdateAuthorizationRuleDelegate(response);
+ return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
@@ -339,114 +385,91 @@ public Observable>> call(Response> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken>() { }.getType())
+ private ServiceResponse createOrUpdateAuthorizationRuleDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
/**
- * Gets the available namespaces within a resource group.
+ * Deletes a namespace authorization rule.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @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<SBNamespaceInner> object if successful.
*/
- public PagedList listByResourceGroup(final String resourceGroupName) {
- ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
- return new PagedList(response.body()) {
- @Override
- public Page nextPage(String nextPageLink) {
- return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
- }
- };
+ public void deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body();
}
/**
- * Gets the available namespaces within a resource group.
+ * Deletes a namespace authorization rule.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) {
- return AzureServiceFuture.fromPageResponse(
- listByResourceGroupSinglePageAsync(resourceGroupName),
- new Func1>>>() {
- @Override
- public Observable>> call(String nextPageLink) {
- return listByResourceGroupNextSinglePageAsync(nextPageLink);
- }
- },
- serviceCallback);
+ public ServiceFuture deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback);
}
/**
- * Gets the available namespaces within a resource group.
+ * Deletes a namespace authorization rule.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the PagedList<SBNamespaceInner> object
+ * @return the {@link ServiceResponse} object if successful.
*/
- public Observable> listByResourceGroupAsync(final String resourceGroupName) {
- return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
- .map(new Func1>, Page>() {
- @Override
- public Page call(ServiceResponse> response) {
- return response.body();
- }
- });
+ public Observable deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
}
/**
- * Gets the available namespaces within a resource group.
+ * Deletes a namespace authorization rule.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the PagedList<SBNamespaceInner> object
- */
- public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
- return listByResourceGroupSinglePageAsync(resourceGroupName)
- .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(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
- }
- });
- }
-
- /**
- * Gets the available namespaces within a resource group.
- *
- ServiceResponse> * @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the PagedList<SBNamespaceInner> object wrapped in {@link ServiceResponse} if successful.
+ * @return the {@link ServiceResponse} object if successful.
*/
- public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
+ public Observable> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
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 (authorizationRuleName == null) {
+ throw new IllegalArgumentException("Parameter authorizationRuleName 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.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>>() {
+ return service.deleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable>> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse> result = listByResourceGroupDelegate(response);
- return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ ServiceResponse clientResponse = deleteAuthorizationRuleDelegate(response);
+ return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
@@ -454,169 +477,185 @@ public Observable>> call(Response> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken>() { }.getType())
+ private ServiceResponse deleteAuthorizationRuleDelegate(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);
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets an authorization rule for a namespace by rule name.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule 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 SBNamespaceInner object if successful.
+ * @return the SBAuthorizationRuleInner object if successful.
*/
- public SBNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, SBNamespaceInner parameters) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().last().body();
+ public SBAuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body();
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets an authorization rule for a namespace by rule name.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule 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 createOrUpdateAsync(String resourceGroupName, String namespaceName, SBNamespaceInner parameters, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback);
+ public ServiceFuture getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback);
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets an authorization rule for a namespace by rule name.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
+ * @return the observable to the SBAuthorizationRuleInner object
*/
- public Observable createOrUpdateAsync(String resourceGroupName, String namespaceName, SBNamespaceInner parameters) {
- return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, SBNamespaceInner>() {
+ public Observable getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, SBAuthorizationRuleInner>() {
@Override
- public SBNamespaceInner call(ServiceResponse response) {
+ public SBAuthorizationRuleInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets an authorization rule for a namespace by rule name.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable for the request
+ * @return the observable to the SBAuthorizationRuleInner object
*/
- public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, SBNamespaceInner parameters) {
+ public Observable> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
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 (authorizationRuleName == null) {
+ throw new IllegalArgumentException("Parameter authorizationRuleName 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);
- Observable> observable = service.createOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
- return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType());
+ return service.getAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, 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 = getAuthorizationRuleDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getAuthorizationRuleDelegate(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);
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets the primary and secondary connection strings for the namespace.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule 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 SBNamespaceInner object if successful.
+ * @return the AccessKeysInner object if successful.
*/
- public SBNamespaceInner beginCreateOrUpdate(String resourceGroupName, String namespaceName, SBNamespaceInner parameters) {
- return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body();
+ public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body();
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets the primary and secondary connection strings for the namespace.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule 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 beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, SBNamespaceInner parameters, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback);
+ public ServiceFuture listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback);
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets the primary and secondary connection strings for the namespace.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the SBNamespaceInner object
+ * @return the observable to the AccessKeysInner object
*/
- public Observable beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, SBNamespaceInner parameters) {
- return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, SBNamespaceInner>() {
+ public Observable listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
+ return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1, AccessKeysInner>() {
@Override
- public SBNamespaceInner call(ServiceResponse response) {
+ public AccessKeysInner call(ServiceResponse response) {
return response.body();
}
});
}
/**
- * Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
+ * Gets the primary and secondary connection strings for the namespace.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
- * @param namespaceName The namespace name.
- * @param parameters Parameters supplied to create a namespace resource.
+ * @param namespaceName The namespace name
+ * @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the SBNamespaceInner object
+ * @return the observable to the AccessKeysInner object
*/
- public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, SBNamespaceInner parameters) {
+ public Observable> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
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 (authorizationRuleName == null) {
+ throw new IllegalArgumentException("Parameter authorizationRuleName 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.beginCreateOrUpdate(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ return service.listKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response);
+ ServiceResponse clientResponse = listKeysDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -625,153 +664,180 @@ public Observable> call(Response
});
}
- private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken