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 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.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.Path; import retrofit2.http.POST; import retrofit2.http.PUT; import retrofit2.http.Query; import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable;
An instance of this class provides access to all the operations defined in EventHubs.
/** * An instance of this class provides access to all the operations defined * in EventHubs. */
public class EventHubsInner {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private EventHubsService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private EventHubManagementClientImpl client;
Initializes an instance of EventHubsInner.
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 EventHubsInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public EventHubsInner(Retrofit retrofit, EventHubManagementClientImpl client) { this.service = retrofit.create(EventHubsService.class); this.client = client; }
The interface defining all the services for EventHubs to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for EventHubs to be * used by Retrofit to perform actually REST calls. */
interface EventHubsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.EventHubs listByNamespace" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs") Observable<Response<ResponseBody>> listByNamespace(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$skip") Integer skip, @Query("$top") Integer top, @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.EventHubs createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") Observable<Response<ResponseBody>> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Body EventhubInner 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.EventHubs delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.EventHubs get" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}") Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.EventHubs listAuthorizationRules" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules") Observable<Response<ResponseBody>> listAuthorizationRules(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.EventHubs createOrUpdateAuthorizationRule" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") Observable<Response<ResponseBody>> createOrUpdateAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @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.EventHubs getAuthorizationRule" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}") Observable<Response<ResponseBody>> getAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @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.EventHubs deleteAuthorizationRule" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> deleteAuthorizationRule(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @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.EventHubs listKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/ListKeys") Observable<Response<ResponseBody>> listKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @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.EventHubs regenerateKeys" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys") Observable<Response<ResponseBody>> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("eventHubName") String eventHubName, @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.EventHubs listByNamespaceNext" }) @GET Observable<Response<ResponseBody>> listByNamespaceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.EventHubs listAuthorizationRulesNext" }) @GET Observable<Response<ResponseBody>> listAuthorizationRulesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
Throws:
Returns:the PagedList<EventhubInner> object if successful.
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation * @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&lt;EventhubInner&gt; object if successful. */
public PagedList<EventhubInner> listByNamespace(final String resourceGroupName, final String namespaceName) { ServiceResponse<Page<EventhubInner>> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName).toBlocking().single(); return new PagedList<EventhubInner>(response.body()) { @Override public Page<EventhubInner> nextPage(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the Event Hubs in 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:
Returns:the ServiceFuture object
/** * Gets all the Event Hubs in 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<EventhubInner>> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final ListOperationCallback<EventhubInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByNamespaceSinglePageAsync(resourceGroupName, namespaceName), new Func1<String, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
Throws:
Returns:the observable to the PagedList<EventhubInner> object
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;EventhubInner&gt; object */
public Observable<Page<EventhubInner>> listByNamespaceAsync(final String resourceGroupName, final String namespaceName) { return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName) .map(new Func1<ServiceResponse<Page<EventhubInner>>, Page<EventhubInner>>() { @Override public Page<EventhubInner> call(ServiceResponse<Page<EventhubInner>> response) { return response.body(); } }); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
Throws:
Returns:the observable to the PagedList<EventhubInner> object
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;EventhubInner&gt; object */
public Observable<ServiceResponse<Page<EventhubInner>>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName) { return listByNamespaceSinglePageAsync(resourceGroupName, namespaceName) .concatMap(new Func1<ServiceResponse<Page<EventhubInner>>, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(ServiceResponse<Page<EventhubInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
Throws:
Returns:the PagedList<EventhubInner> object wrapped in ServiceResponse if successful.
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;EventhubInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<EventhubInner>>> listByNamespaceSinglePageAsync(final String resourceGroupName, final String namespaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } final Integer skip = null; final Integer top = null; return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), skip, top, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<EventhubInner>> result = listByNamespaceDelegate(response); return Observable.just(new ServiceResponse<Page<EventhubInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • skip – Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls.
  • top – May be used to limit the number of results to the most recent N usageDetails.
Throws:
Returns:the PagedList<EventhubInner> object if successful.
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. * @param top May be used to limit the number of results to the most recent N usageDetails. * @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&lt;EventhubInner&gt; object if successful. */
public PagedList<EventhubInner> listByNamespace(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { ServiceResponse<Page<EventhubInner>> response = listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top).toBlocking().single(); return new PagedList<EventhubInner>(response.body()) { @Override public Page<EventhubInner> nextPage(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • skip – Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls.
  • top – May be used to limit the number of results to the most recent N usageDetails.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. * @param top May be used to limit the number of results to the most recent N usageDetails. * @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<EventhubInner>> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top, final ListOperationCallback<EventhubInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top), new Func1<String, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • skip – Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls.
  • top – May be used to limit the number of results to the most recent N usageDetails.
Throws:
Returns:the observable to the PagedList<EventhubInner> object
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;EventhubInner&gt; object */
public Observable<Page<EventhubInner>> listByNamespaceAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { return listByNamespaceWithServiceResponseAsync(resourceGroupName, namespaceName, skip, top) .map(new Func1<ServiceResponse<Page<EventhubInner>>, Page<EventhubInner>>() { @Override public Page<EventhubInner> call(ServiceResponse<Page<EventhubInner>> response) { return response.body(); } }); }
Gets all the Event Hubs in a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • skip – Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls.
  • top – May be used to limit the number of results to the most recent N usageDetails.
Throws:
Returns:the observable to the PagedList<EventhubInner> object
/** * Gets all the Event Hubs in a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;EventhubInner&gt; object */
public Observable<ServiceResponse<Page<EventhubInner>>> listByNamespaceWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { return listByNamespaceSinglePageAsync(resourceGroupName, namespaceName, skip, top) .concatMap(new Func1<ServiceResponse<Page<EventhubInner>>, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(ServiceResponse<Page<EventhubInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the Event Hubs in a Namespace. ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. ServiceResponse> * @param namespaceName The Namespace name ServiceResponse> * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. ServiceResponse> * @param top May be used to limit the number of results to the most recent N usageDetails.
Throws:
Returns:the PagedList<EventhubInner> object wrapped in ServiceResponse if successful.
/** * Gets all the Event Hubs in a Namespace. * ServiceResponse<PageImpl<EventhubInner>> * @param resourceGroupName Name of the resource group within the azure subscription. ServiceResponse<PageImpl<EventhubInner>> * @param namespaceName The Namespace name ServiceResponse<PageImpl<EventhubInner>> * @param skip Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. ServiceResponse<PageImpl<EventhubInner>> * @param top May be used to limit the number of results to the most recent N usageDetails. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;EventhubInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<EventhubInner>>> listByNamespaceSinglePageAsync(final String resourceGroupName, final String namespaceName, final Integer skip, final Integer top) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listByNamespace(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), skip, top, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<EventhubInner>> result = listByNamespaceDelegate(response); return Observable.just(new ServiceResponse<Page<EventhubInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<EventhubInner>> listByNamespaceDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<EventhubInner>, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<EventhubInner>>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Creates or updates a new Event Hub as a nested resource within a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • parameters – Parameters supplied to create an Event Hub resource.
Throws:
Returns:the EventhubInner object if successful.
/** * Creates or updates a new Event Hub as a nested resource within a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param parameters Parameters supplied to create an Event Hub 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 EventhubInner object if successful. */
public EventhubInner createOrUpdate(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters).toBlocking().single().body(); }
Creates or updates a new Event Hub as a nested resource within a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • parameters – Parameters supplied to create an Event Hub resource.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates or updates a new Event Hub as a nested resource within a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param parameters Parameters supplied to create an Event Hub 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<EventhubInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters, final ServiceCallback<EventhubInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters), serviceCallback); }
Creates or updates a new Event Hub as a nested resource within a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • parameters – Parameters supplied to create an Event Hub resource.
Throws:
Returns:the observable to the EventhubInner object
/** * Creates or updates a new Event Hub as a nested resource within a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param parameters Parameters supplied to create an Event Hub resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EventhubInner object */
public Observable<EventhubInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, parameters).map(new Func1<ServiceResponse<EventhubInner>, EventhubInner>() { @Override public EventhubInner call(ServiceResponse<EventhubInner> response) { return response.body(); } }); }
Creates or updates a new Event Hub as a nested resource within a Namespace.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • parameters – Parameters supplied to create an Event Hub resource.
Throws:
Returns:the observable to the EventhubInner object
/** * Creates or updates a new Event Hub as a nested resource within a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param parameters Parameters supplied to create an Event Hub resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EventhubInner object */
public Observable<ServiceResponse<EventhubInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, EventhubInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } if (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(parameters); return service.createOrUpdate(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EventhubInner>>>() { @Override public Observable<ServiceResponse<EventhubInner>> call(Response<ResponseBody> response) { try { ServiceResponse<EventhubInner> clientResponse = createOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<EventhubInner> createOrUpdateDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<EventhubInner, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<EventhubInner>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Deletes an Event Hub from the specified Namespace and resource group.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
/** * Deletes an Event Hub from the specified Namespace and resource group. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void delete(String resourceGroupName, String namespaceName, String eventHubName) { deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single().body(); }
Deletes an Event Hub from the specified Namespace and resource group.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes an Event Hub from the specified Namespace and resource group. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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, String eventHubName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName), serviceCallback); }
Deletes an Event Hub from the specified Namespace and resource group.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an Event Hub from the specified Namespace and resource group. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> deleteAsync(String resourceGroupName, String namespaceName, String eventHubName) { return deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes an Event Hub from the specified Namespace and resource group.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an Event Hub from the specified Namespace and resource group. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } if (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.delete(resourceGroupName, namespaceName, eventHubName, 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 = deleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> deleteDelegate(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 Event Hubs description for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the EventhubInner object if successful.
/** * Gets an Event Hubs description for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @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 EventhubInner object if successful. */
public EventhubInner get(String resourceGroupName, String namespaceName, String eventHubName) { return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single().body(); }
Gets an Event Hubs description for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets an Event Hubs description for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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<EventhubInner> getAsync(String resourceGroupName, String namespaceName, String eventHubName, final ServiceCallback<EventhubInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName), serviceCallback); }
Gets an Event Hubs description for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the observable to the EventhubInner object
/** * Gets an Event Hubs description for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EventhubInner object */
public Observable<EventhubInner> getAsync(String resourceGroupName, String namespaceName, String eventHubName) { return getWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName).map(new Func1<ServiceResponse<EventhubInner>, EventhubInner>() { @Override public EventhubInner call(ServiceResponse<EventhubInner> response) { return response.body(); } }); }
Gets an Event Hubs description for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the observable to the EventhubInner object
/** * Gets an Event Hubs description for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EventhubInner object */
public Observable<ServiceResponse<EventhubInner>> getWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } if (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.get(resourceGroupName, namespaceName, eventHubName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<EventhubInner>>>() { @Override public Observable<ServiceResponse<EventhubInner>> call(Response<ResponseBody> response) { try { ServiceResponse<EventhubInner> clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<EventhubInner> getDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<EventhubInner, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<EventhubInner>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Gets the authorization rules for an Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the PagedList<AuthorizationRuleInner> object if successful.
/** * Gets the authorization rules for an Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @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&lt;AuthorizationRuleInner&gt; object if successful. */
public PagedList<AuthorizationRuleInner> listAuthorizationRules(final String resourceGroupName, final String namespaceName, final String eventHubName) { ServiceResponse<Page<AuthorizationRuleInner>> response = listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName).toBlocking().single(); return new PagedList<AuthorizationRuleInner>(response.body()) { @Override public Page<AuthorizationRuleInner> nextPage(String nextPageLink) { return listAuthorizationRulesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets the authorization rules for an Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets the authorization rules for an Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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 String eventHubName, final ListOperationCallback<AuthorizationRuleInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName), new Func1<String, Observable<ServiceResponse<Page<AuthorizationRuleInner>>>>() { @Override public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> call(String nextPageLink) { return listAuthorizationRulesNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets the authorization rules for an Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the observable to the PagedList<AuthorizationRuleInner> object
/** * Gets the authorization rules for an Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;AuthorizationRuleInner&gt; object */
public Observable<Page<AuthorizationRuleInner>> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { return listAuthorizationRulesWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName) .map(new Func1<ServiceResponse<Page<AuthorizationRuleInner>>, Page<AuthorizationRuleInner>>() { @Override public Page<AuthorizationRuleInner> call(ServiceResponse<Page<AuthorizationRuleInner>> response) { return response.body(); } }); }
Gets the authorization rules for an Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
Throws:
Returns:the observable to the PagedList<AuthorizationRuleInner> object
/** * Gets the authorization rules for an Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;AuthorizationRuleInner&gt; object */
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> listAuthorizationRulesWithServiceResponseAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { return listAuthorizationRulesSinglePageAsync(resourceGroupName, namespaceName, eventHubName) .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 the authorization rules for an Event Hub. ServiceResponse> * @param resourceGroupName Name of the resource group within the azure subscription. ServiceResponse> * @param namespaceName The Namespace name ServiceResponse> * @param eventHubName The Event Hub name
Throws:
Returns:the PagedList<AuthorizationRuleInner> object wrapped in ServiceResponse if successful.
/** * Gets the authorization rules for an Event Hub. * ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param resourceGroupName Name of the resource group within the azure subscription. ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param namespaceName The Namespace name ServiceResponse<PageImpl<AuthorizationRuleInner>> * @param eventHubName The Event Hub name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;AuthorizationRuleInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<AuthorizationRuleInner>>> listAuthorizationRulesSinglePageAsync(final String resourceGroupName, final String namespaceName, final String eventHubName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (namespaceName == null) { throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); } if (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listAuthorizationRules(resourceGroupName, namespaceName, eventHubName, 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 the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • rights – The rights associated with the rule.
Throws:
Returns:the AuthorizationRuleInner object if successful.
/** * Creates or updates an AuthorizationRule for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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 eventHubName, String authorizationRuleName, List<AccessRights> rights) { return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights).toBlocking().single().body(); }
Creates or updates an AuthorizationRule for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • rights – The rights associated with the rule.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Creates or updates an AuthorizationRule for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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 eventHubName, String authorizationRuleName, List<AccessRights> rights, final ServiceCallback<AuthorizationRuleInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights), serviceCallback); }
Creates or updates an AuthorizationRule for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • rights – The rights associated with the rule.
Throws:
Returns:the observable to the AuthorizationRuleInner object
/** * Creates or updates an AuthorizationRule for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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 eventHubName, String authorizationRuleName, List<AccessRights> rights) { return createOrUpdateAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, rights).map(new Func1<ServiceResponse<AuthorizationRuleInner>, AuthorizationRuleInner>() { @Override public AuthorizationRuleInner call(ServiceResponse<AuthorizationRuleInner> response) { return response.body(); } }); }
Creates or updates an AuthorizationRule for the specified Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • rights – The rights associated with the rule.
Throws:
Returns:the observable to the AuthorizationRuleInner object
/** * Creates or updates an AuthorizationRule for the specified Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @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 eventHubName, 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 (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName 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, eventHubName, 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); }
Gets an AuthorizationRule for an Event Hub by rule name.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the AuthorizationRuleInner object if successful.
/** * Gets an AuthorizationRule for an Event Hub by rule name. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @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 eventHubName, String authorizationRuleName) { return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toBlocking().single().body(); }
Gets an AuthorizationRule for an Event Hub by rule name.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets an AuthorizationRule for an Event Hub by rule name. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @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 eventHubName, String authorizationRuleName, final ServiceCallback<AuthorizationRuleInner> serviceCallback) { return ServiceFuture.fromResponse(getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName), serviceCallback); }
Gets an AuthorizationRule for an Event Hub by rule name.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the observable to the AuthorizationRuleInner object
/** * Gets an AuthorizationRule for an Event Hub by rule name. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AuthorizationRuleInner object */
public Observable<AuthorizationRuleInner> getAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { return getAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).map(new Func1<ServiceResponse<AuthorizationRuleInner>, AuthorizationRuleInner>() { @Override public AuthorizationRuleInner call(ServiceResponse<AuthorizationRuleInner> response) { return response.body(); } }); }
Gets an AuthorizationRule for an Event Hub by rule name.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the observable to the AuthorizationRuleInner object
/** * Gets an AuthorizationRule for an Event Hub by rule name. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AuthorizationRuleInner object */
public Observable<ServiceResponse<AuthorizationRuleInner>> getAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, 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 (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName 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, eventHubName, 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); }
Deletes an Event Hub AuthorizationRule.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
/** * Deletes an Event Hub AuthorizationRule. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @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 eventHubName, String authorizationRuleName) { deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toBlocking().single().body(); }
Deletes an Event Hub AuthorizationRule.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Deletes an Event Hub AuthorizationRule. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @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 eventHubName, String authorizationRuleName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName), serviceCallback); }
Deletes an Event Hub AuthorizationRule.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an Event Hub AuthorizationRule. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> deleteAuthorizationRuleAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { return deleteAuthorizationRuleWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Deletes an Event Hub AuthorizationRule.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the ServiceResponse object if successful.
/** * Deletes an Event Hub AuthorizationRule. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> deleteAuthorizationRuleWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, 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 (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName 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, eventHubName, 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 the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the AccessKeysInner object if successful.
/** * Gets the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @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 eventHubName, String authorizationRuleName) { return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).toBlocking().single().body(); }
Gets the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Gets the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @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 eventHubName, String authorizationRuleName, final ServiceCallback<AccessKeysInner> serviceCallback) { return ServiceFuture.fromResponse(listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName), serviceCallback); }
Gets the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the observable to the AccessKeysInner object
/** * Gets the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessKeysInner object */
public Observable<AccessKeysInner> listKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName) { return listKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName).map(new Func1<ServiceResponse<AccessKeysInner>, AccessKeysInner>() { @Override public AccessKeysInner call(ServiceResponse<AccessKeysInner> response) { return response.body(); } }); }
Gets the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
Throws:
Returns:the observable to the AccessKeysInner object
/** * Gets the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessKeysInner object */
public Observable<ServiceResponse<AccessKeysInner>> listKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String eventHubName, 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 (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName 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, eventHubName, 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 ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • parameters – Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey).
Throws:
Returns:the AccessKeysInner object if successful.
/** * Regenerates the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). * @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 eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters).toBlocking().single().body(); }
Regenerates the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • parameters – Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey).
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Regenerates the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). * @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 eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters, final ServiceCallback<AccessKeysInner> serviceCallback) { return ServiceFuture.fromResponse(regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters), serviceCallback); }
Regenerates the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • parameters – Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey).
Throws:
Returns:the observable to the AccessKeysInner object
/** * Regenerates the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessKeysInner object */
public Observable<AccessKeysInner> regenerateKeysAsync(String resourceGroupName, String namespaceName, String eventHubName, String authorizationRuleName, RegenerateAccessKeyParameters parameters) { return regenerateKeysWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName, authorizationRuleName, parameters).map(new Func1<ServiceResponse<AccessKeysInner>, AccessKeysInner>() { @Override public AccessKeysInner call(ServiceResponse<AccessKeysInner> response) { return response.body(); } }); }
Regenerates the ACS and SAS connection strings for the Event Hub.
Params:
  • resourceGroupName – Name of the resource group within the azure subscription.
  • namespaceName – The Namespace name
  • eventHubName – The Event Hub name
  • authorizationRuleName – The authorization rule name.
  • parameters – Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey).
Throws:
Returns:the observable to the AccessKeysInner object
/** * Regenerates the ACS and SAS connection strings for the Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @param eventHubName The Event Hub name * @param authorizationRuleName The authorization rule name. * @param parameters Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). * @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 eventHubName, 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 (eventHubName == null) { throw new IllegalArgumentException("Parameter eventHubName 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, eventHubName, 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); }
Gets all the Event Hubs in a Namespace.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<EventhubInner> object if successful.
/** * Gets all the Event Hubs in 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&lt;EventhubInner&gt; object if successful. */
public PagedList<EventhubInner> listByNamespaceNext(final String nextPageLink) { ServiceResponse<Page<EventhubInner>> response = listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<EventhubInner>(response.body()) { @Override public Page<EventhubInner> nextPage(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
Gets all the Event Hubs in 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:
Returns:the ServiceFuture object
/** * Gets all the Event Hubs in 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<EventhubInner>> listByNamespaceNextAsync(final String nextPageLink, final ServiceFuture<List<EventhubInner>> serviceFuture, final ListOperationCallback<EventhubInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByNamespaceNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
Gets all the Event Hubs in a Namespace.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<EventhubInner> object
/** * Gets all the Event Hubs in 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&lt;EventhubInner&gt; object */
public Observable<Page<EventhubInner>> listByNamespaceNextAsync(final String nextPageLink) { return listByNamespaceNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<EventhubInner>>, Page<EventhubInner>>() { @Override public Page<EventhubInner> call(ServiceResponse<Page<EventhubInner>> response) { return response.body(); } }); }
Gets all the Event Hubs in a Namespace.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<EventhubInner> object
/** * Gets all the Event Hubs in 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&lt;EventhubInner&gt; object */
public Observable<ServiceResponse<Page<EventhubInner>>> listByNamespaceNextWithServiceResponseAsync(final String nextPageLink) { return listByNamespaceNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<EventhubInner>>, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(ServiceResponse<Page<EventhubInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByNamespaceNextWithServiceResponseAsync(nextPageLink)); } }); }
Gets all the Event Hubs in a Namespace. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<EventhubInner> object wrapped in ServiceResponse if successful.
/** * Gets all the Event Hubs in a Namespace. * ServiceResponse<PageImpl<EventhubInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;EventhubInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<EventhubInner>>> listByNamespaceNextSinglePageAsync(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.listByNamespaceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<EventhubInner>>>>() { @Override public Observable<ServiceResponse<Page<EventhubInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<EventhubInner>> result = listByNamespaceNextDelegate(response); return Observable.just(new ServiceResponse<Page<EventhubInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl<EventhubInner>> listByNamespaceNextDelegate(Response<ResponseBody> response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl<EventhubInner>, ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl<EventhubInner>>() { }.getType()) .registerError(ErrorResponseException.class) .build(response); }
Gets the authorization rules for an Event Hub.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<AuthorizationRuleInner> object if successful.
/** * Gets the authorization rules for an Event Hub. * * @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&lt;AuthorizationRuleInner&gt; 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 the authorization rules for an Event Hub.
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:
Returns:the ServiceFuture object
/** * Gets the authorization rules for an Event Hub. * * @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 the authorization rules for an Event Hub.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<AuthorizationRuleInner> object
/** * Gets the authorization rules for an Event Hub. * * @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&lt;AuthorizationRuleInner&gt; 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 the authorization rules for an Event Hub.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<AuthorizationRuleInner> object
/** * Gets the authorization rules for an Event Hub. * * @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&lt;AuthorizationRuleInner&gt; 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 the authorization rules for an Event Hub. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<AuthorizationRuleInner> object wrapped in ServiceResponse if successful.
/** * Gets the authorization rules for an Event Hub. * 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&lt;AuthorizationRuleInner&gt; 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); } }