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.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.eventhub.implementation;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete;
import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing;
import retrofit2.Retrofit;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureServiceFuture;
import com.microsoft.azure.ListOperationCallback;
import com.microsoft.azure.management.eventhub.AccessRights;
import com.microsoft.azure.management.eventhub.CheckNameAvailabilityParameter;
import com.microsoft.azure.management.eventhub.ErrorResponseException;
import com.microsoft.azure.management.eventhub.RegenerateAccessKeyParameters;
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.PATCH;
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 Namespaces.
/**
* An instance of this class provides access to all the operations defined
* in Namespaces.
*/
public class NamespacesInner implements InnerSupportsGet<EHNamespaceInner>, InnerSupportsDelete<Void>, InnerSupportsListing<EHNamespaceInner> {
The Retrofit service to perform REST calls. /** The Retrofit service to perform REST calls. */
private NamespacesService service;
The service client containing this operation class. /** The service client containing this operation class. */
private EventHubManagementClientImpl client;
Initializes an instance of NamespacesInner.
Params: - retrofit – the Retrofit instance built from a Retrofit Builder.
- client – the instance of the service client containing this operation class.
/**
* Initializes an instance of NamespacesInner.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public NamespacesInner(Retrofit retrofit, EventHubManagementClientImpl client) {
this.service = retrofit.create(NamespacesService.class);
this.client = client;
}
The interface defining all the services for Namespaces to be
used by Retrofit to perform actually REST calls.
/**
* The interface defining all the services for Namespaces to be
* 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.eventhub.Namespaces checkNameAvailability" })
@POST("subscriptions/{subscriptionId}/providers/Microsoft.EventHub/CheckNameAvailability")
Observable<Response<ResponseBody>> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckNameAvailabilityParameter parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces list" })
@GET("subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces")
Observable<Response<ResponseBody>> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces listByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces")
Observable<Response<ResponseBody>> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces createOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}")
Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body EHNamespaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces beginCreateOrUpdate" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}")
Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body EHNamespaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces delete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces beginDelete" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces getByResourceGroup" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}")
Observable<Response<ResponseBody>> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces update" })
@PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}")
Observable<Response<ResponseBody>> update(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Body EHNamespaceInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces getMessagingPlan" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/messagingplan")
Observable<Response<ResponseBody>> getMessagingPlan(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces listAuthorizationRules" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules")
Observable<Response<ResponseBody>> 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.eventhub.Namespaces createOrUpdateAuthorizationRule" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
Observable<Response<ResponseBody>> 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 AuthorizationRuleInner parameters, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces deleteAuthorizationRule" })
@HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true)
Observable<Response<ResponseBody>> 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.eventhub.Namespaces getAuthorizationRule" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}")
Observable<Response<ResponseBody>> 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.eventhub.Namespaces listKeys" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys")
Observable<Response<ResponseBody>> 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.eventhub.Namespaces regenerateKeys" })
@POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys")
Observable<Response<ResponseBody>> 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.eventhub.Namespaces createOrUpdateNetworkRuleSet" })
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default")
Observable<Response<ResponseBody>> 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);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces getNetworkRuleSet" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default")
Observable<Response<ResponseBody>> 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.eventhub.Namespaces listNext" })
@GET
Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.Namespaces listByResourceGroupNext" })
@GET
Observable<Response<ResponseBody>> 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.eventhub.Namespaces listAuthorizationRulesNext" })
@GET
Observable<Response<ResponseBody>> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
Check the give Namespace name availability.
Params: - name – Name to check the namespace name availability
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the CheckNameAvailabilityResultInner object if successful.
/**
* Check the give Namespace name availability.
*
* @param name Name to check the namespace name availability
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorResponseException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the CheckNameAvailabilityResultInner object if successful.
*/
public CheckNameAvailabilityResultInner checkNameAvailability(String name) {
return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().body();
}
Check the give Namespace name availability.
Params: - name – Name to check the namespace name availability
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Check the give Namespace name availability.
*
* @param name Name to check the namespace name availability
* @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<CheckNameAvailabilityResultInner> checkNameAvailabilityAsync(String name, final ServiceCallback<CheckNameAvailabilityResultInner> serviceCallback) {
return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(name), serviceCallback);
}
Check the give Namespace name availability.
Params: - name – Name to check the namespace name availability
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CheckNameAvailabilityResultInner object
/**
* Check the give Namespace name availability.
*
* @param name Name to check the namespace name availability
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CheckNameAvailabilityResultInner object
*/
public Observable<CheckNameAvailabilityResultInner> checkNameAvailabilityAsync(String name) {
return checkNameAvailabilityWithServiceResponseAsync(name).map(new Func1<ServiceResponse<CheckNameAvailabilityResultInner>, CheckNameAvailabilityResultInner>() {
@Override
public CheckNameAvailabilityResultInner call(ServiceResponse<CheckNameAvailabilityResultInner> response) {
return response.body();
}
});
}
Check the give Namespace name availability.
Params: - name – Name to check the namespace name availability
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the CheckNameAvailabilityResultInner object
/**
* Check the give Namespace name availability.
*
* @param name Name to check the namespace name availability
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CheckNameAvailabilityResultInner object
*/
public Observable<ServiceResponse<CheckNameAvailabilityResultInner>> checkNameAvailabilityWithServiceResponseAsync(String name) {
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.");
}
CheckNameAvailabilityParameter parameters = new CheckNameAvailabilityParameter();
parameters.withName(name);
return service.checkNameAvailability(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CheckNameAvailabilityResultInner>>>() {
@Override
public Observable<ServiceResponse<CheckNameAvailabilityResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<CheckNameAvailabilityResultInner> clientResponse = checkNameAvailabilityDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<CheckNameAvailabilityResultInner> checkNameAvailabilityDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<CheckNameAvailabilityResultInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<CheckNameAvailabilityResultInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<EHNamespaceInner> object if successful.
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @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<EHNamespaceInner> object if successful.
*/
public PagedList<EHNamespaceInner> list() {
ServiceResponse<Page<EHNamespaceInner>> response = listSinglePageAsync().toBlocking().single();
return new PagedList<EHNamespaceInner>(response.body()) {
@Override
public Page<EHNamespaceInner> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Params: - serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @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<List<EHNamespaceInner>> listAsync(final ListOperationCallback<EHNamespaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listSinglePageAsync(),
new Func1<String, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<Page<EHNamespaceInner>> listAsync() {
return listWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Page<EHNamespaceInner>>() {
@Override
public Page<EHNamespaceInner> call(ServiceResponse<Page<EHNamespaceInner>> response) {
return response.body();
}
});
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listWithServiceResponseAsync() {
return listSinglePageAsync()
.concatMap(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(ServiceResponse<Page<EHNamespaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<EHNamespaceInner> object wrapped in ServiceResponse
if successful.
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listSinglePageAsync() {
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<Response<ResponseBody>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<EHNamespaceInner>> result = listDelegate(response);
return Observable.just(new ServiceResponse<Page<EHNamespaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<EHNamespaceInner>> listDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<EHNamespaceInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<EHNamespaceInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists the available Namespaces within a resource group.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<EHNamespaceInner> object if successful.
/**
* Lists the available Namespaces within a resource group.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @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<EHNamespaceInner> object if successful.
*/
public PagedList<EHNamespaceInner> listByResourceGroup(final String resourceGroupName) {
ServiceResponse<Page<EHNamespaceInner>> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single();
return new PagedList<EHNamespaceInner>(response.body()) {
@Override
public Page<EHNamespaceInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists the available Namespaces within a resource group.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists the available Namespaces within a resource group.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @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<List<EHNamespaceInner>> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback<EHNamespaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupSinglePageAsync(resourceGroupName),
new Func1<String, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists the available Namespaces within a resource group.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists the available Namespaces within a resource group.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<Page<EHNamespaceInner>> listByResourceGroupAsync(final String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName)
.map(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Page<EHNamespaceInner>>() {
@Override
public Page<EHNamespaceInner> call(ServiceResponse<Page<EHNamespaceInner>> response) {
return response.body();
}
});
}
Lists the available Namespaces within a resource group.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists the available Namespaces within a resource group.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) {
return listByResourceGroupSinglePageAsync(resourceGroupName)
.concatMap(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(ServiceResponse<Page<EHNamespaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists 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
Returns: the PagedList<EHNamespaceInner> object wrapped in ServiceResponse
if successful.
/**
* Lists the available Namespaces within a resource group.
*
ServiceResponse<PageImpl<EHNamespaceInner>> * @param resourceGroupName Name of the resource group within the azure subscription.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName 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<Response<ResponseBody>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<EHNamespaceInner>> result = listByResourceGroupDelegate(response);
return Observable.just(new ServiceResponse<Page<EHNamespaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<EHNamespaceInner>> listByResourceGroupDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<EHNamespaceInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<EHNamespaceInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the EHNamespaceInner object if successful.
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @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 EHNamespaceInner object if successful.
*/
public EHNamespaceInner createOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().last().body();
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<EHNamespaceInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback<EHNamespaceInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback);
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<EHNamespaceInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1<ServiceResponse<EHNamespaceInner>, EHNamespaceInner>() {
@Override
public EHNamespaceInner call(ServiceResponse<EHNamespaceInner> response) {
return response.body();
}
});
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<EHNamespaceInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner 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 (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<Response<ResponseBody>> 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<EHNamespaceInner>() { }.getType());
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the EHNamespaceInner object if successful.
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @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 EHNamespaceInner object if successful.
*/
public EHNamespaceInner beginCreateOrUpdate(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body();
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<EHNamespaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback<EHNamespaceInner> serviceCallback) {
return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback);
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EHNamespaceInner object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EHNamespaceInner object
*/
public Observable<EHNamespaceInner> beginCreateOrUpdateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) {
return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1<ServiceResponse<EHNamespaceInner>, EHNamespaceInner>() {
@Override
public EHNamespaceInner call(ServiceResponse<EHNamespaceInner> response) {
return response.body();
}
});
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for creating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EHNamespaceInner object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for creating a namespace resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EHNamespaceInner object
*/
public Observable<ServiceResponse<EHNamespaceInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner 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 (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<Response<ResponseBody>, Observable<ServiceResponse<EHNamespaceInner>>>() {
@Override
public Observable<ServiceResponse<EHNamespaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EHNamespaceInner> clientResponse = beginCreateOrUpdateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<EHNamespaceInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<EHNamespaceInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<EHNamespaceInner>() { }.getType())
.register(201, new TypeToken<EHNamespaceInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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
*/
public void delete(String resourceGroupName, String namespaceName) {
deleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().last().body();
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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<Void> deleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback);
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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
*/
public Observable<Void> deleteAsync(String resourceGroupName, String namespaceName) {
return deleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable for the request
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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
*/
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, 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.");
}
Observable<Response<ResponseBody>> observable = service.delete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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
*/
public void beginDelete(String resourceGroupName, String namespaceName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body();
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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<Void> beginDeleteAsync(String resourceGroupName, String namespaceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback);
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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 {@link ServiceResponse} object if successful.
*/
public Observable<Void> beginDeleteAsync(String resourceGroupName, String namespaceName) {
return beginDeleteWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an existing namespace. This operation also removes all associated resources under 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 {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, 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.beginDelete(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
@Override
public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
try {
ServiceResponse<Void> clientResponse = beginDeleteDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<Void> beginDeleteDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<Void>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets the description of the specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the EHNamespaceInner object if successful.
/**
* Gets the description of the specified 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 EHNamespaceInner object if successful.
*/
public EHNamespaceInner getByResourceGroup(String resourceGroupName, String namespaceName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body();
}
Gets the description of the specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the description of the specified 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<EHNamespaceInner> getByResourceGroupAsync(String resourceGroupName, String namespaceName, final ServiceCallback<EHNamespaceInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback);
}
Gets the description of the specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EHNamespaceInner object
/**
* Gets the description of the specified 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 EHNamespaceInner object
*/
public Observable<EHNamespaceInner> getByResourceGroupAsync(String resourceGroupName, String namespaceName) {
return getByResourceGroupWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1<ServiceResponse<EHNamespaceInner>, EHNamespaceInner>() {
@Override
public EHNamespaceInner call(ServiceResponse<EHNamespaceInner> response) {
return response.body();
}
});
}
Gets the description of the specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EHNamespaceInner object
/**
* Gets the description of the specified 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 EHNamespaceInner object
*/
public Observable<ServiceResponse<EHNamespaceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, 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.getByResourceGroup(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EHNamespaceInner>>>() {
@Override
public Observable<ServiceResponse<EHNamespaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EHNamespaceInner> clientResponse = getByResourceGroupDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<EHNamespaceInner> getByResourceGroupDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<EHNamespaceInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<EHNamespaceInner>() { }.getType())
.register(201, new TypeToken<EHNamespaceInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for updating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the EHNamespaceInner object if successful.
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for updating a namespace resource.
* @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 EHNamespaceInner object if successful.
*/
public EHNamespaceInner update(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) {
return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body();
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for updating a namespace resource.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for updating a namespace resource.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<EHNamespaceInner> updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters, final ServiceCallback<EHNamespaceInner> serviceCallback) {
return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback);
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for updating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EHNamespaceInner object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for updating a namespace resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EHNamespaceInner object
*/
public Observable<EHNamespaceInner> updateAsync(String resourceGroupName, String namespaceName, EHNamespaceInner parameters) {
return updateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1<ServiceResponse<EHNamespaceInner>, EHNamespaceInner>() {
@Override
public EHNamespaceInner call(ServiceResponse<EHNamespaceInner> response) {
return response.body();
}
});
}
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – Parameters for updating a namespace resource.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the EHNamespaceInner object
/**
* Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters Parameters for updating a namespace resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the EHNamespaceInner object
*/
public Observable<ServiceResponse<EHNamespaceInner>> updateWithServiceResponseAsync(String resourceGroupName, String namespaceName, EHNamespaceInner 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 (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.update(resourceGroupName, namespaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EHNamespaceInner>>>() {
@Override
public Observable<ServiceResponse<EHNamespaceInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<EHNamespaceInner> clientResponse = updateDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<EHNamespaceInner> updateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<EHNamespaceInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<EHNamespaceInner>() { }.getType())
.register(201, new TypeToken<EHNamespaceInner>() { }.getType())
.register(202, new TypeToken<Void>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets messaging plan for specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the MessagingPlanInner object if successful.
/**
* Gets messaging plan for specified 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 MessagingPlanInner object if successful.
*/
public MessagingPlanInner getMessagingPlan(String resourceGroupName, String namespaceName) {
return getMessagingPlanWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body();
}
Gets messaging plan for specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets messaging plan for specified 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<MessagingPlanInner> getMessagingPlanAsync(String resourceGroupName, String namespaceName, final ServiceCallback<MessagingPlanInner> serviceCallback) {
return ServiceFuture.fromResponse(getMessagingPlanWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback);
}
Gets messaging plan for specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the MessagingPlanInner object
/**
* Gets messaging plan for specified 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 MessagingPlanInner object
*/
public Observable<MessagingPlanInner> getMessagingPlanAsync(String resourceGroupName, String namespaceName) {
return getMessagingPlanWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1<ServiceResponse<MessagingPlanInner>, MessagingPlanInner>() {
@Override
public MessagingPlanInner call(ServiceResponse<MessagingPlanInner> response) {
return response.body();
}
});
}
Gets messaging plan for specified namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the MessagingPlanInner object
/**
* Gets messaging plan for specified 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 MessagingPlanInner object
*/
public Observable<ServiceResponse<MessagingPlanInner>> getMessagingPlanWithServiceResponseAsync(String resourceGroupName, 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.getMessagingPlan(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<MessagingPlanInner>>>() {
@Override
public Observable<ServiceResponse<MessagingPlanInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<MessagingPlanInner> clientResponse = getMessagingPlanDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<MessagingPlanInner> getMessagingPlanDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<MessagingPlanInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<MessagingPlanInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets a list of authorization rules for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<AuthorizationRuleInner> object if successful.
/**
* Gets a list of authorization rules for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @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<AuthorizationRuleInner> object if successful.
*/
public PagedList<AuthorizationRuleInner> listAuthorizationRules(final String resourceGroupName, final String namespaceName) {
ServiceResponse<Page<AuthorizationRuleInner>> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single();
return new PagedList<AuthorizationRuleInner>(response.body()) {
@Override
public Page<AuthorizationRuleInner> nextPage(String nextPageLink) {
return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets a list of authorization rules for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets a list of authorization rules for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @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<List<AuthorizationRuleInner>> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback<AuthorizationRuleInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName),
new Func1<String, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() {
@Override
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(String nextPageLink) {
return listAuthorizationRulesNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets a list of authorization rules for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<AuthorizationRuleInner> object
/**
* Gets a list of authorization rules for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<AuthorizationRuleInner> object
*/
public Observable<Page<AuthorizationRuleInner>> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName) {
return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName)
.map(new Func1<ServiceResponse<Page<AuthorizationRuleInner>>, Page<AuthorizationRuleInner>>() {
@Override
public Page<AuthorizationRuleInner> call(ServiceResponse<Page<AuthorizationRuleInner>> response) {
return response.body();
}
});
}
Gets a list of authorization rules for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<AuthorizationRuleInner> object
/**
* Gets a list of authorization rules for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<AuthorizationRuleInner> object
*/
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) {
return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName)
.concatMap(new Func1<ServiceResponse<Page<AuthorizationRuleInner>>, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() {
@Override
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(ServiceResponse<Page<AuthorizationRuleInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets a list of 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
Returns: the PagedList<AuthorizationRuleInner> object wrapped in ServiceResponse
if successful.
/**
* Gets a list of authorization rules for a Namespace.
*
ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param resourceGroupName Name of the resource group within the azure subscription.
ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> 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.");
}
return service.listAuthorizationRules(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() {
@Override
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<AuthorizationRuleInner>> result = listAuthorizationRulesDelegate(response);
return Observable.just(new ServiceResponse<Page<AuthorizationRuleInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<AuthorizationRuleInner>> listAuthorizationRulesDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<AuthorizationRuleInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<AuthorizationRuleInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Creates or updates an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- rights – The rights associated with the rule.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the AuthorizationRuleInner object if successful.
/**
* Creates or updates an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @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 AuthorizationRuleInner object if successful.
*/
public AuthorizationRuleInner createOrUpdateAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName, List<AccessRights> rights) {
return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).toBlocking().single().body();
}
Creates or updates an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- rights – The rights associated with the rule.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Creates or updates an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @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<AuthorizationRuleInner> createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List<AccessRights> rights, final ServiceCallback<AuthorizationRuleInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights), serviceCallback);
}
Creates or updates an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- rights – The rights associated with the rule.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AuthorizationRuleInner object
/**
* Creates or updates an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @param rights The rights associated with the rule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AuthorizationRuleInner object
*/
public Observable<AuthorizationRuleInner> createOrUpdateAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List<AccessRights> rights) {
return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, rights).map(new Func1<ServiceResponse<AuthorizationRuleInner>, AuthorizationRuleInner>() {
@Override
public AuthorizationRuleInner call(ServiceResponse<AuthorizationRuleInner> response) {
return response.body();
}
});
}
Creates or updates an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- rights – The rights associated with the rule.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AuthorizationRuleInner object
/**
* Creates or updates an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @param rights The rights associated with the rule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AuthorizationRuleInner object
*/
public Observable<ServiceResponse<AuthorizationRuleInner>> createOrUpdateAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, List<AccessRights> 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.");
}
if (rights == null) {
throw new IllegalArgumentException("Parameter rights is required and cannot be null.");
}
Validator.validate(rights);
AuthorizationRuleInner parameters = new AuthorizationRuleInner();
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<Response<ResponseBody>, Observable<ServiceResponse<AuthorizationRuleInner>>>() {
@Override
public Observable<ServiceResponse<AuthorizationRuleInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<AuthorizationRuleInner> clientResponse = createOrUpdateAuthorizationRuleDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<AuthorizationRuleInner> createOrUpdateAuthorizationRuleDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<AuthorizationRuleInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<AuthorizationRuleInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Deletes an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
/**
* Deletes an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @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 deleteAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) {
deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body();
}
Deletes an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Deletes an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @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<Void> deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback);
}
Deletes an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<Void> deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
public Void call(ServiceResponse<Void> response) {
return response.body();
}
});
}
Deletes an AuthorizationRule for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceResponse
object if successful.
/**
* Deletes an AuthorizationRule for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/
public Observable<ServiceResponse<Void>> 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.deleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
@Override
public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
try {
ServiceResponse<Void> clientResponse = deleteAuthorizationRuleDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<Void> deleteAuthorizationRuleDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets an AuthorizationRule for a Namespace by rule name.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the AuthorizationRuleInner object if successful.
/**
* Gets an AuthorizationRule for a Namespace by rule name.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @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 AuthorizationRuleInner object if successful.
*/
public AuthorizationRuleInner getAuthorizationRule(String resourceGroupName, String namespaceName, String authorizationRuleName) {
return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body();
}
Gets an AuthorizationRule for a Namespace by rule name.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets an AuthorizationRule for a Namespace by rule name.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @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<AuthorizationRuleInner> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback<AuthorizationRuleInner> serviceCallback) {
return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback);
}
Gets an AuthorizationRule for a Namespace by rule name.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AuthorizationRuleInner object
/**
* Gets an AuthorizationRule for a Namespace by rule name.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AuthorizationRuleInner object
*/
public Observable<AuthorizationRuleInner> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1<ServiceResponse<AuthorizationRuleInner>, AuthorizationRuleInner>() {
@Override
public AuthorizationRuleInner call(ServiceResponse<AuthorizationRuleInner> response) {
return response.body();
}
});
}
Gets an AuthorizationRule for a Namespace by rule name.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AuthorizationRuleInner object
/**
* Gets an AuthorizationRule for a Namespace by rule name.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AuthorizationRuleInner object
*/
public Observable<ServiceResponse<AuthorizationRuleInner>> 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 (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.getAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<AuthorizationRuleInner>>>() {
@Override
public Observable<ServiceResponse<AuthorizationRuleInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<AuthorizationRuleInner> clientResponse = getAuthorizationRuleDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<AuthorizationRuleInner> getAuthorizationRuleDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<AuthorizationRuleInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<AuthorizationRuleInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets the primary and secondary connection strings for the Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the AccessKeysInner object if successful.
/**
* Gets the primary and secondary connection strings for the Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @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 AccessKeysInner object if successful.
*/
public AccessKeysInner listKeys(String resourceGroupName, String namespaceName, String authorizationRuleName) {
return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).toBlocking().single().body();
}
Gets the primary and secondary connection strings for the Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets the primary and secondary connection strings for the Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @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<AccessKeysInner> listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, final ServiceCallback<AccessKeysInner> serviceCallback) {
return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName), serviceCallback);
}
Gets the primary and secondary connection strings for the Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AccessKeysInner object
/**
* Gets the primary and secondary connection strings for the Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AccessKeysInner object
*/
public Observable<AccessKeysInner> listKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName).map(new Func1<ServiceResponse<AccessKeysInner>, AccessKeysInner>() {
@Override
public AccessKeysInner call(ServiceResponse<AccessKeysInner> response) {
return response.body();
}
});
}
Gets the primary and secondary connection strings for the Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AccessKeysInner object
/**
* Gets the primary and secondary connection strings for the Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AccessKeysInner object
*/
public Observable<ServiceResponse<AccessKeysInner>> 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 (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.listKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<AccessKeysInner>>>() {
@Override
public Observable<ServiceResponse<AccessKeysInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<AccessKeysInner> clientResponse = listKeysDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<AccessKeysInner> listKeysDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<AccessKeysInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<AccessKeysInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Regenerates the primary or secondary connection strings for the specified Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- parameters – Parameters required to regenerate the connection string.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the AccessKeysInner object if successful.
/**
* Regenerates the primary or secondary connection strings for the specified Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @param parameters Parameters required to regenerate the connection string.
* @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 AccessKeysInner object if successful.
*/
public AccessKeysInner regenerateKeys(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) {
return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).toBlocking().single().body();
}
Regenerates the primary or secondary connection strings for the specified Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- parameters – Parameters required to regenerate the connection string.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Regenerates the primary or secondary connection strings for the specified Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @param parameters Parameters required to regenerate the connection string.
* @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<AccessKeysInner> regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters, final ServiceCallback<AccessKeysInner> serviceCallback) {
return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters), serviceCallback);
}
Regenerates the primary or secondary connection strings for the specified Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- parameters – Parameters required to regenerate the connection string.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AccessKeysInner object
/**
* Regenerates the primary or secondary connection strings for the specified Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @param parameters Parameters required to regenerate the connection string.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AccessKeysInner object
*/
public Observable<AccessKeysInner> regenerateKeysAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) {
return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, authorizationRuleName, parameters).map(new Func1<ServiceResponse<AccessKeysInner>, AccessKeysInner>() {
@Override
public AccessKeysInner call(ServiceResponse<AccessKeysInner> response) {
return response.body();
}
});
}
Regenerates the primary or secondary connection strings for the specified Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- authorizationRuleName – The authorization rule name.
- parameters – Parameters required to regenerate the connection string.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the AccessKeysInner object
/**
* Regenerates the primary or secondary connection strings for the specified Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param authorizationRuleName The authorization rule name.
* @param parameters Parameters required to regenerate the connection string.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the AccessKeysInner object
*/
public Observable<ServiceResponse<AccessKeysInner>> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName, RegenerateAccessKeyParameters 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 (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.regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<AccessKeysInner>>>() {
@Override
public Observable<ServiceResponse<AccessKeysInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<AccessKeysInner> clientResponse = regenerateKeysDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<AccessKeysInner> regenerateKeysDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<AccessKeysInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<AccessKeysInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Create or update NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – The Namespace IpFilterRule.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the NetworkRuleSetInner object if successful.
/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @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 NetworkRuleSetInner object if successful.
*/
public NetworkRuleSetInner createOrUpdateNetworkRuleSet(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) {
return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).toBlocking().single().body();
}
Create or update NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – The Namespace IpFilterRule.
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @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<NetworkRuleSetInner> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, final ServiceCallback<NetworkRuleSetInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback);
}
Create or update NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – The Namespace IpFilterRule.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkRuleSetInner object
/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkRuleSetInner object
*/
public Observable<NetworkRuleSetInner> createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) {
return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1<ServiceResponse<NetworkRuleSetInner>, NetworkRuleSetInner>() {
@Override
public NetworkRuleSetInner call(ServiceResponse<NetworkRuleSetInner> response) {
return response.body();
}
});
}
Create or update NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- parameters – The Namespace IpFilterRule.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkRuleSetInner object
/**
* Create or update NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param parameters The Namespace IpFilterRule.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkRuleSetInner object
*/
public Observable<ServiceResponse<NetworkRuleSetInner>> createOrUpdateNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner 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 (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 (parameters == null) {
throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
}
Validator.validate(parameters);
return service.createOrUpdateNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkRuleSetInner>>>() {
@Override
public Observable<ServiceResponse<NetworkRuleSetInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkRuleSetInner> clientResponse = createOrUpdateNetworkRuleSetDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkRuleSetInner> createOrUpdateNetworkRuleSetDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkRuleSetInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkRuleSetInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the NetworkRuleSetInner object if successful.
/**
* Gets NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @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 NetworkRuleSetInner object if successful.
*/
public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) {
return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body();
}
Gets NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets NetworkRuleSet for a 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<NetworkRuleSetInner> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName, final ServiceCallback<NetworkRuleSetInner> serviceCallback) {
return ServiceFuture.fromResponse(getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback);
}
Gets NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkRuleSetInner object
/**
* Gets NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkRuleSetInner object
*/
public Observable<NetworkRuleSetInner> getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) {
return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1<ServiceResponse<NetworkRuleSetInner>, NetworkRuleSetInner>() {
@Override
public NetworkRuleSetInner call(ServiceResponse<NetworkRuleSetInner> response) {
return response.body();
}
});
}
Gets NetworkRuleSet for a Namespace.
Params: - resourceGroupName – Name of the resource group within the azure subscription.
- namespaceName – The Namespace name
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the NetworkRuleSetInner object
/**
* Gets NetworkRuleSet for a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the NetworkRuleSetInner object
*/
public Observable<ServiceResponse<NetworkRuleSetInner>> getNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, 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.getNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NetworkRuleSetInner>>>() {
@Override
public Observable<ServiceResponse<NetworkRuleSetInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<NetworkRuleSetInner> clientResponse = getNetworkRuleSetDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<NetworkRuleSetInner> getNetworkRuleSetDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<NetworkRuleSetInner, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<NetworkRuleSetInner>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<EHNamespaceInner> object if successful.
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @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<EHNamespaceInner> object if successful.
*/
public PagedList<EHNamespaceInner> listNext(final String nextPageLink) {
ServiceResponse<Page<EHNamespaceInner>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<EHNamespaceInner>(response.body()) {
@Override
public Page<EHNamespaceInner> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<EHNamespaceInner>> listNextAsync(final String nextPageLink, final ServiceFuture<List<EHNamespaceInner>> serviceFuture, final ListOperationCallback<EHNamespaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<Page<EHNamespaceInner>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Page<EHNamespaceInner>>() {
@Override
public Page<EHNamespaceInner> call(ServiceResponse<Page<EHNamespaceInner>> response) {
return response.body();
}
});
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listNextWithServiceResponseAsync(final String nextPageLink) {
return listNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(ServiceResponse<Page<EHNamespaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<EHNamespaceInner> object wrapped in ServiceResponse
if successful.
/**
* Lists all the available Namespaces within a subscription, irrespective of the resource groups.
*
ServiceResponse<PageImpl<EHNamespaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s", nextPageLink);
return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<EHNamespaceInner>> result = listNextDelegate(response);
return Observable.just(new ServiceResponse<Page<EHNamespaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<EHNamespaceInner>> listNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<EHNamespaceInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<EHNamespaceInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Lists the available Namespaces within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<EHNamespaceInner> object if successful.
/**
* Lists the available Namespaces within a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @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<EHNamespaceInner> object if successful.
*/
public PagedList<EHNamespaceInner> listByResourceGroupNext(final String nextPageLink) {
ServiceResponse<Page<EHNamespaceInner>> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<EHNamespaceInner>(response.body()) {
@Override
public Page<EHNamespaceInner> nextPage(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Lists the available Namespaces within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Lists the available Namespaces within a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<EHNamespaceInner>> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture<List<EHNamespaceInner>> serviceFuture, final ListOperationCallback<EHNamespaceInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listByResourceGroupNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Lists the available Namespaces within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists the available Namespaces within a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<Page<EHNamespaceInner>> listByResourceGroupNextAsync(final String nextPageLink) {
return listByResourceGroupNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Page<EHNamespaceInner>>() {
@Override
public Page<EHNamespaceInner> call(ServiceResponse<Page<EHNamespaceInner>> response) {
return response.body();
}
});
}
Lists the available Namespaces within a resource group.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<EHNamespaceInner> object
/**
* Lists the available Namespaces within a resource group.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<EHNamespaceInner> object
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) {
return listByResourceGroupNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<EHNamespaceInner>>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(ServiceResponse<Page<EHNamespaceInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink));
}
});
}
Lists the available Namespaces within a resource group.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<EHNamespaceInner> object wrapped in ServiceResponse
if successful.
/**
* Lists the available Namespaces within a resource group.
*
ServiceResponse<PageImpl<EHNamespaceInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<EHNamespaceInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<EHNamespaceInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s", nextPageLink);
return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<EHNamespaceInner>>>>() {
@Override
public Observable<ServiceResponse<Page<EHNamespaceInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<EHNamespaceInner>> result = listByResourceGroupNextDelegate(response);
return Observable.just(new ServiceResponse<Page<EHNamespaceInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<EHNamespaceInner>> listByResourceGroupNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<EHNamespaceInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<EHNamespaceInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
Gets a list of authorization rules for a Namespace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
- ErrorResponseException – thrown if the request is rejected by server
- RuntimeException – all other wrapped checked exceptions if the request fails to be sent
Returns: the PagedList<AuthorizationRuleInner> object if successful.
/**
* Gets a list of authorization rules for a Namespace.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @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<AuthorizationRuleInner> object if successful.
*/
public PagedList<AuthorizationRuleInner> listAuthorizationRulesNext(final String nextPageLink) {
ServiceResponse<Page<AuthorizationRuleInner>> response = listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<AuthorizationRuleInner>(response.body()) {
@Override
public Page<AuthorizationRuleInner> nextPage(String nextPageLink) {
return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}
Gets a list of authorization rules for a Namespace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
- serviceFuture – the ServiceFuture object tracking the Retrofit calls
- serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the ServiceFuture
object
/**
* Gets a list of authorization rules for a Namespace.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param serviceFuture the ServiceFuture object tracking the Retrofit calls
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
public ServiceFuture<List<AuthorizationRuleInner>> listAuthorizationRulesNextAsync(final String nextPageLink, final ServiceFuture<List<AuthorizationRuleInner>> serviceFuture, final ListOperationCallback<AuthorizationRuleInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listAuthorizationRulesNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() {
@Override
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(String nextPageLink) {
return listAuthorizationRulesNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}
Gets a list of authorization rules for a Namespace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<AuthorizationRuleInner> object
/**
* Gets a list of authorization rules for a Namespace.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<AuthorizationRuleInner> object
*/
public Observable<Page<AuthorizationRuleInner>> listAuthorizationRulesNextAsync(final String nextPageLink) {
return listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<AuthorizationRuleInner>>, Page<AuthorizationRuleInner>>() {
@Override
public Page<AuthorizationRuleInner> call(ServiceResponse<Page<AuthorizationRuleInner>> response) {
return response.body();
}
});
}
Gets a list of authorization rules for a Namespace.
Params: - nextPageLink – The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the observable to the PagedList<AuthorizationRuleInner> object
/**
* Gets a list of authorization rules for a Namespace.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<AuthorizationRuleInner> object
*/
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> listAuthorizationRulesNextWithServiceResponseAsync(final String nextPageLink) {
return listAuthorizationRulesNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<AuthorizationRuleInner>>, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() {
@Override
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(ServiceResponse<Page<AuthorizationRuleInner>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listAuthorizationRulesNextWithServiceResponseAsync(nextPageLink));
}
});
}
Gets a list of authorization rules for a Namespace.
ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws: - IllegalArgumentException – thrown if parameters fail the validation
Returns: the PagedList<AuthorizationRuleInner> object wrapped in ServiceResponse
if successful.
/**
* Gets a list of authorization rules for a Namespace.
*
ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<AuthorizationRuleInner> object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> listAuthorizationRulesNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
}
String nextUrl = String.format("%s", nextPageLink);
return service.listAuthorizationRulesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() {
@Override
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<AuthorizationRuleInner>> result = listAuthorizationRulesNextDelegate(response);
return Observable.just(new ServiceResponse<Page<AuthorizationRuleInner>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
private ServiceResponse<PageImpl<AuthorizationRuleInner>> listAuthorizationRulesNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<AuthorizationRuleInner>, ErrorResponseException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<AuthorizationRuleInner>>() { }.getType())
.registerError(ErrorResponseException.class)
.build(response);
}
}