Search in sources :

Example 1 with Policykey

use of com.microsoft.azure.management.servicebus.Policykey in project azure-sdk-for-java by Azure.

the class TopicsInner method regenerateKeysWithServiceResponseAsync.

/**
     * Regenerates primary or secondary connection strings for the topic.
     *
     * @param resourceGroupName Name of the Resource group within the Azure subscription.
     * @param namespaceName The namespace name
     * @param topicName The topic name.
     * @param authorizationRuleName The authorizationrule name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ResourceListKeysInner object
     */
public Observable<ServiceResponse<ResourceListKeysInner>> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String topicName, 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 (topicName == null) {
        throw new IllegalArgumentException("Parameter topicName 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.");
    }
    final Policykey policykey = null;
    RegenerateKeysParameters parameters = new RegenerateKeysParameters();
    parameters.withPolicykey(null);
    return service.regenerateKeys(resourceGroupName, namespaceName, topicName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ResourceListKeysInner>>>() {

        @Override
        public Observable<ServiceResponse<ResourceListKeysInner>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<ResourceListKeysInner> clientResponse = regenerateKeysDelegate(response);
                return Observable.just(clientResponse);
            } catch (Throwable t) {
                return Observable.error(t);
            }
        }
    });
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) ServiceResponse(com.microsoft.rest.ServiceResponse) Policykey(com.microsoft.azure.management.servicebus.Policykey) RegenerateKeysParameters(com.microsoft.azure.management.servicebus.RegenerateKeysParameters) Observable(rx.Observable) ResponseBody(okhttp3.ResponseBody)

Example 2 with Policykey

use of com.microsoft.azure.management.servicebus.Policykey in project azure-sdk-for-java by Azure.

the class NamespacesInner method regenerateKeysWithServiceResponseAsync.

/**
     * Regenerates the primary or secondary connection strings for the namespace.
     *
     * @param resourceGroupName Name of the Resource group within the Azure subscription.
     * @param namespaceName The namespace name
     * @param authorizationRuleName The authorizationrule name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ResourceListKeysInner object
     */
public Observable<ServiceResponse<ResourceListKeysInner>> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String authorizationRuleName) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (namespaceName == null) {
        throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null.");
    }
    if (authorizationRuleName == null) {
        throw new IllegalArgumentException("Parameter authorizationRuleName is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    if (this.client.apiVersion() == null) {
        throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
    }
    final Policykey policykey = null;
    RegenerateKeysParameters parameters = new RegenerateKeysParameters();
    parameters.withPolicykey(null);
    return service.regenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ResourceListKeysInner>>>() {

        @Override
        public Observable<ServiceResponse<ResourceListKeysInner>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<ResourceListKeysInner> clientResponse = regenerateKeysDelegate(response);
                return Observable.just(clientResponse);
            } catch (Throwable t) {
                return Observable.error(t);
            }
        }
    });
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) ServiceResponse(com.microsoft.rest.ServiceResponse) Policykey(com.microsoft.azure.management.servicebus.Policykey) RegenerateKeysParameters(com.microsoft.azure.management.servicebus.RegenerateKeysParameters) Observable(rx.Observable) ResponseBody(okhttp3.ResponseBody)

Example 3 with Policykey

use of com.microsoft.azure.management.servicebus.Policykey in project azure-sdk-for-java by Azure.

the class QueuesInner method regenerateKeysWithServiceResponseAsync.

/**
     * Regenerates the primary or secondary connection strings to the queue.
     *
     * @param resourceGroupName Name of the Resource group within the Azure subscription.
     * @param namespaceName The namespace name
     * @param queueName The queue name.
     * @param authorizationRuleName The authorizationrule name.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ResourceListKeysInner object
     */
public Observable<ServiceResponse<ResourceListKeysInner>> regenerateKeysWithServiceResponseAsync(String resourceGroupName, String namespaceName, String queueName, 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 (queueName == null) {
        throw new IllegalArgumentException("Parameter queueName 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.");
    }
    final Policykey policykey = null;
    RegenerateKeysParameters parameters = new RegenerateKeysParameters();
    parameters.withPolicykey(null);
    return service.regenerateKeys(resourceGroupName, namespaceName, queueName, authorizationRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ResourceListKeysInner>>>() {

        @Override
        public Observable<ServiceResponse<ResourceListKeysInner>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<ResourceListKeysInner> clientResponse = regenerateKeysDelegate(response);
                return Observable.just(clientResponse);
            } catch (Throwable t) {
                return Observable.error(t);
            }
        }
    });
}
Also used : Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) ServiceResponse(com.microsoft.rest.ServiceResponse) Policykey(com.microsoft.azure.management.servicebus.Policykey) RegenerateKeysParameters(com.microsoft.azure.management.servicebus.RegenerateKeysParameters) Observable(rx.Observable) ResponseBody(okhttp3.ResponseBody)

Aggregations

Policykey (com.microsoft.azure.management.servicebus.Policykey)3 RegenerateKeysParameters (com.microsoft.azure.management.servicebus.RegenerateKeysParameters)3 ServiceResponse (com.microsoft.rest.ServiceResponse)3 ResponseBody (okhttp3.ResponseBody)3 Response (retrofit2.Response)3 Observable (rx.Observable)3