Search in sources :

Example 1 with CsmPublishingProfileOptions

use of com.microsoft.azure.management.appservice.CsmPublishingProfileOptions in project azure-sdk-for-java by Azure.

the class WebAppsInner method listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync.

/**
     * Gets the publishing profile for an app (or deployment slot, if specified).
     * Gets the publishing profile for an app (or deployment slot, if specified).
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the app.
     * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot.
     * @param format Name of the format. Valid values are:
      FileZilla3
      WebDeploy -- default
      Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the InputStream object
     */
public Observable<ServiceResponse<InputStream>> listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot, PublishingProfileFormat format) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (name == null) {
        throw new IllegalArgumentException("Parameter name is required and cannot be null.");
    }
    if (slot == null) {
        throw new IllegalArgumentException("Parameter slot is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2016-08-01";
    CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions();
    publishingProfileOptions.withFormat(format);
    return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<InputStream>>>() {

        @Override
        public Observable<ServiceResponse<InputStream>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<InputStream> clientResponse = listPublishingProfileXmlWithSecretsSlotDelegate(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) InputStream(java.io.InputStream) Observable(rx.Observable) CsmPublishingProfileOptions(com.microsoft.azure.management.appservice.CsmPublishingProfileOptions) ResponseBody(okhttp3.ResponseBody)

Example 2 with CsmPublishingProfileOptions

use of com.microsoft.azure.management.appservice.CsmPublishingProfileOptions in project azure-sdk-for-java by Azure.

the class WebAppsInner method listPublishingProfileXmlWithSecretsWithServiceResponseAsync.

/**
     * Gets the publishing profile for an app (or deployment slot, if specified).
     * Gets the publishing profile for an app (or deployment slot, if specified).
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the app.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the InputStream object
     */
public Observable<ServiceResponse<InputStream>> listPublishingProfileXmlWithSecretsWithServiceResponseAsync(String resourceGroupName, String name) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (name == null) {
        throw new IllegalArgumentException("Parameter name is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2016-08-01";
    final PublishingProfileFormat format = null;
    CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions();
    publishingProfileOptions.withFormat(null);
    return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<InputStream>>>() {

        @Override
        public Observable<ServiceResponse<InputStream>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<InputStream> clientResponse = listPublishingProfileXmlWithSecretsDelegate(response);
                return Observable.just(clientResponse);
            } catch (Throwable t) {
                return Observable.error(t);
            }
        }
    });
}
Also used : InputStream(java.io.InputStream) Observable(rx.Observable) ResponseBody(okhttp3.ResponseBody) Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) PublishingProfileFormat(com.microsoft.azure.management.appservice.PublishingProfileFormat) ServiceResponse(com.microsoft.rest.ServiceResponse) CsmPublishingProfileOptions(com.microsoft.azure.management.appservice.CsmPublishingProfileOptions)

Example 3 with CsmPublishingProfileOptions

use of com.microsoft.azure.management.appservice.CsmPublishingProfileOptions in project azure-sdk-for-java by Azure.

the class WebAppsInner method listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync.

/**
     * Gets the publishing profile for an app (or deployment slot, if specified).
     * Gets the publishing profile for an app (or deployment slot, if specified).
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the app.
     * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for the production slot.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the InputStream object
     */
public Observable<ServiceResponse<InputStream>> listPublishingProfileXmlWithSecretsSlotWithServiceResponseAsync(String resourceGroupName, String name, String slot) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (name == null) {
        throw new IllegalArgumentException("Parameter name is required and cannot be null.");
    }
    if (slot == null) {
        throw new IllegalArgumentException("Parameter slot is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2016-08-01";
    final PublishingProfileFormat format = null;
    CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions();
    publishingProfileOptions.withFormat(null);
    return service.listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<InputStream>>>() {

        @Override
        public Observable<ServiceResponse<InputStream>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<InputStream> clientResponse = listPublishingProfileXmlWithSecretsSlotDelegate(response);
                return Observable.just(clientResponse);
            } catch (Throwable t) {
                return Observable.error(t);
            }
        }
    });
}
Also used : InputStream(java.io.InputStream) Observable(rx.Observable) ResponseBody(okhttp3.ResponseBody) Response(retrofit2.Response) ServiceResponse(com.microsoft.rest.ServiceResponse) PublishingProfileFormat(com.microsoft.azure.management.appservice.PublishingProfileFormat) ServiceResponse(com.microsoft.rest.ServiceResponse) CsmPublishingProfileOptions(com.microsoft.azure.management.appservice.CsmPublishingProfileOptions)

Example 4 with CsmPublishingProfileOptions

use of com.microsoft.azure.management.appservice.CsmPublishingProfileOptions in project azure-sdk-for-java by Azure.

the class WebAppsInner method listPublishingProfileXmlWithSecretsWithServiceResponseAsync.

/**
     * Gets the publishing profile for an app (or deployment slot, if specified).
     * Gets the publishing profile for an app (or deployment slot, if specified).
     *
     * @param resourceGroupName Name of the resource group to which the resource belongs.
     * @param name Name of the app.
     * @param format Name of the format. Valid values are:
      FileZilla3
      WebDeploy -- default
      Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp'
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the InputStream object
     */
public Observable<ServiceResponse<InputStream>> listPublishingProfileXmlWithSecretsWithServiceResponseAsync(String resourceGroupName, String name, PublishingProfileFormat format) {
    if (resourceGroupName == null) {
        throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
    }
    if (name == null) {
        throw new IllegalArgumentException("Parameter name is required and cannot be null.");
    }
    if (this.client.subscriptionId() == null) {
        throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
    }
    final String apiVersion = "2016-08-01";
    CsmPublishingProfileOptions publishingProfileOptions = new CsmPublishingProfileOptions();
    publishingProfileOptions.withFormat(format);
    return service.listPublishingProfileXmlWithSecrets(resourceGroupName, name, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), publishingProfileOptions, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<InputStream>>>() {

        @Override
        public Observable<ServiceResponse<InputStream>> call(Response<ResponseBody> response) {
            try {
                ServiceResponse<InputStream> clientResponse = listPublishingProfileXmlWithSecretsDelegate(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) InputStream(java.io.InputStream) Observable(rx.Observable) CsmPublishingProfileOptions(com.microsoft.azure.management.appservice.CsmPublishingProfileOptions) ResponseBody(okhttp3.ResponseBody)

Aggregations

CsmPublishingProfileOptions (com.microsoft.azure.management.appservice.CsmPublishingProfileOptions)4 ServiceResponse (com.microsoft.rest.ServiceResponse)4 InputStream (java.io.InputStream)4 ResponseBody (okhttp3.ResponseBody)4 Response (retrofit2.Response)4 Observable (rx.Observable)4 PublishingProfileFormat (com.microsoft.azure.management.appservice.PublishingProfileFormat)2