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.compute.implementation; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.GalleryImageUpdate; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.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 GalleryImages.
/** * An instance of this class provides access to all the operations defined * in GalleryImages. */
public class GalleryImagesInner {
The Retrofit service to perform REST calls.
/** The Retrofit service to perform REST calls. */
private GalleryImagesService service;
The service client containing this operation class.
/** The service client containing this operation class. */
private ComputeManagementClientImpl client;
Initializes an instance of GalleryImagesInner.
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 GalleryImagesInner. * * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */
public GalleryImagesInner(Retrofit retrofit, ComputeManagementClientImpl client) { this.service = retrofit.create(GalleryImagesService.class); this.client = client; }
The interface defining all the services for GalleryImages to be used by Retrofit to perform actually REST calls.
/** * The interface defining all the services for GalleryImages to be * used by Retrofit to perform actually REST calls. */
interface GalleryImagesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.GalleryImages createOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") Observable<Response<ResponseBody>> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageInner galleryImage, @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.compute.GalleryImages beginCreateOrUpdate" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") Observable<Response<ResponseBody>> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageInner galleryImage, @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.compute.GalleryImages update" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") Observable<Response<ResponseBody>> update(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageUpdate galleryImage, @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.compute.GalleryImages beginUpdate" }) @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") Observable<Response<ResponseBody>> beginUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @Query("api-version") String apiVersion, @Body GalleryImageUpdate galleryImage, @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.compute.GalleryImages get" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}") Observable<Response<ResponseBody>> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.compute.GalleryImages delete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.compute.GalleryImages beginDelete" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", method = "DELETE", hasBody = true) Observable<Response<ResponseBody>> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @Path("galleryImageName") String galleryImageName, @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.compute.GalleryImages listByGallery" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images") Observable<Response<ResponseBody>> listByGallery(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("galleryName") String galleryName, @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.compute.GalleryImages listByGalleryNext" }) @GET Observable<Response<ResponseBody>> listByGalleryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
Throws:
Returns:the GalleryImageInner object if successful.
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the GalleryImageInner object if successful. */
public GalleryImageInner createOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().last().body(); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @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<GalleryImageInner> createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage, final ServiceCallback<GalleryImageInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
Throws:
Returns:the observable for the request
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<GalleryImageInner> createOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1<ServiceResponse<GalleryImageInner>, GalleryImageInner>() { @Override public GalleryImageInner call(ServiceResponse<GalleryImageInner> response) { return response.body(); } }); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
Throws:
Returns:the observable for the request
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<GalleryImageInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } if (galleryImage == null) { throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); } Validator.validate(galleryImage); final String apiVersion = "2019-12-01"; Observable<Response<ResponseBody>> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<GalleryImageInner>() { }.getType()); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
Throws:
Returns:the GalleryImageInner object if successful.
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the GalleryImageInner object if successful. */
public GalleryImageInner beginCreateOrUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().single().body(); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @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<GalleryImageInner> beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage, final ServiceCallback<GalleryImageInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
Throws:
Returns:the observable to the GalleryImageInner object
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GalleryImageInner object */
public Observable<GalleryImageInner> beginCreateOrUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1<ServiceResponse<GalleryImageInner>, GalleryImageInner>() { @Override public GalleryImageInner call(ServiceResponse<GalleryImageInner> response) { return response.body(); } }); }
Create or update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be created.
  • galleryImageName – The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the create or update gallery image operation.
Throws:
Returns:the observable to the GalleryImageInner object
/** * Create or update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be created. * @param galleryImageName The name of the gallery Image Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the create or update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GalleryImageInner object */
public Observable<ServiceResponse<GalleryImageInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageInner galleryImage) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } if (galleryImage == null) { throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); } Validator.validate(galleryImage); final String apiVersion = "2019-12-01"; return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GalleryImageInner>>>() { @Override public Observable<ServiceResponse<GalleryImageInner>> call(Response<ResponseBody> response) { try { ServiceResponse<GalleryImageInner> clientResponse = beginCreateOrUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<GalleryImageInner> beginCreateOrUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<GalleryImageInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<GalleryImageInner>() { }.getType()) .register(201, new TypeToken<GalleryImageInner>() { }.getType()) .register(202, new TypeToken<GalleryImageInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
Throws:
Returns:the GalleryImageInner object if successful.
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the GalleryImageInner object if successful. */
public GalleryImageInner update(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { return updateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().last().body(); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @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<GalleryImageInner> updateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage, final ServiceCallback<GalleryImageInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
Throws:
Returns:the observable for the request
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<GalleryImageInner> updateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { return updateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1<ServiceResponse<GalleryImageInner>, GalleryImageInner>() { @Override public GalleryImageInner call(ServiceResponse<GalleryImageInner> response) { return response.body(); } }); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
Throws:
Returns:the observable for the request
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<GalleryImageInner>> updateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } if (galleryImage == null) { throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); } Validator.validate(galleryImage); final String apiVersion = "2019-12-01"; Observable<Response<ResponseBody>> observable = service.update(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<GalleryImageInner>() { }.getType()); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
Throws:
Returns:the GalleryImageInner object if successful.
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the GalleryImageInner object if successful. */
public GalleryImageInner beginUpdate(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { return beginUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).toBlocking().single().body(); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @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<GalleryImageInner> beginUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage, final ServiceCallback<GalleryImageInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage), serviceCallback); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
Throws:
Returns:the observable to the GalleryImageInner object
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GalleryImageInner object */
public Observable<GalleryImageInner> beginUpdateAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { return beginUpdateWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName, galleryImage).map(new Func1<ServiceResponse<GalleryImageInner>, GalleryImageInner>() { @Override public GalleryImageInner call(ServiceResponse<GalleryImageInner> response) { return response.body(); } }); }
Update a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be updated.
  • galleryImageName – The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters.
  • galleryImage – Parameters supplied to the update gallery image operation.
Throws:
Returns:the observable to the GalleryImageInner object
/** * Update a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be updated. * @param galleryImageName The name of the gallery Image Definition to be updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. * @param galleryImage Parameters supplied to the update gallery image operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GalleryImageInner object */
public Observable<ServiceResponse<GalleryImageInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName, GalleryImageUpdate galleryImage) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } if (galleryImage == null) { throw new IllegalArgumentException("Parameter galleryImage is required and cannot be null."); } Validator.validate(galleryImage); final String apiVersion = "2019-12-01"; return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, galleryImage, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GalleryImageInner>>>() { @Override public Observable<ServiceResponse<GalleryImageInner>> call(Response<ResponseBody> response) { try { ServiceResponse<GalleryImageInner> clientResponse = beginUpdateDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<GalleryImageInner> beginUpdateDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<GalleryImageInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<GalleryImageInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Retrieves information about a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
  • galleryImageName – The name of the gallery Image Definition to be retrieved.
Throws:
Returns:the GalleryImageInner object if successful.
/** * Retrieves information about a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. * @param galleryImageName The name of the gallery Image Definition to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the GalleryImageInner object if successful. */
public GalleryImageInner get(String resourceGroupName, String galleryName, String galleryImageName) { return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single().body(); }
Retrieves information about a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
  • galleryImageName – The name of the gallery Image Definition to be retrieved.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Retrieves information about a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. * @param galleryImageName The name of the gallery Image Definition to be retrieved. * @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<GalleryImageInner> getAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback<GalleryImageInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); }
Retrieves information about a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
  • galleryImageName – The name of the gallery Image Definition to be retrieved.
Throws:
Returns:the observable to the GalleryImageInner object
/** * Retrieves information about a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. * @param galleryImageName The name of the gallery Image Definition to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GalleryImageInner object */
public Observable<GalleryImageInner> getAsync(String resourceGroupName, String galleryName, String galleryImageName) { return getWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1<ServiceResponse<GalleryImageInner>, GalleryImageInner>() { @Override public GalleryImageInner call(ServiceResponse<GalleryImageInner> response) { return response.body(); } }); }
Retrieves information about a gallery Image Definition.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
  • galleryImageName – The name of the gallery Image Definition to be retrieved.
Throws:
Returns:the observable to the GalleryImageInner object
/** * Retrieves information about a gallery Image Definition. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which the Image Definitions are to be retrieved. * @param galleryImageName The name of the gallery Image Definition to be retrieved. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the GalleryImageInner object */
public Observable<ServiceResponse<GalleryImageInner>> getWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } final String apiVersion = "2019-12-01"; return service.get(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<GalleryImageInner>>>() { @Override public Observable<ServiceResponse<GalleryImageInner>> call(Response<ResponseBody> response) { try { ServiceResponse<GalleryImageInner> clientResponse = getDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<GalleryImageInner> getDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<GalleryImageInner, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<GalleryImageInner>() { }.getType()) .registerError(CloudException.class) .build(response); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
Throws:
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException 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 galleryName, String galleryImageName) { deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().last().body(); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @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 galleryName, String galleryImageName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
Throws:
Returns:the observable for the request
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<Void> deleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { return deleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
Throws:
Returns:the observable for the request
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } final String apiVersion = "2019-12-01"; Observable<Response<ResponseBody>> observable = service.delete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType()); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
Throws:
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */
public void beginDelete(String resourceGroupName, String galleryName, String galleryImageName) { beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).toBlocking().single().body(); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName), serviceCallback); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
Throws:
Returns:the ServiceResponse object if successful.
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<Void> beginDeleteAsync(String resourceGroupName, String galleryName, String galleryImageName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, galleryName, galleryImageName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
Delete a gallery image.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery in which the Image Definition is to be deleted.
  • galleryImageName – The name of the gallery Image Definition to be deleted.
Throws:
Returns:the ServiceResponse object if successful.
/** * Delete a gallery image. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery in which the Image Definition is to be deleted. * @param galleryImageName The name of the gallery Image Definition to be deleted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */
public Observable<ServiceResponse<Void>> beginDeleteWithServiceResponseAsync(String resourceGroupName, String galleryName, String galleryImageName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } if (galleryImageName == null) { throw new IllegalArgumentException("Parameter galleryImageName is required and cannot be null."); } final String apiVersion = "2019-12-01"; return service.beginDelete(this.client.subscriptionId(), resourceGroupName, galleryName, galleryImageName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = beginDeleteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<Void> beginDeleteDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<Void>() { }.getType()) .register(202, new TypeToken<Void>() { }.getType()) .register(204, new TypeToken<Void>() { }.getType()) .registerError(CloudException.class) .build(response); }
List gallery Image Definitions in a gallery.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which Image Definitions are to be listed.
Throws:
Returns:the PagedList<GalleryImageInner> object if successful.
/** * List gallery Image Definitions in a gallery. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be listed. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException 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;GalleryImageInner&gt; object if successful. */
public PagedList<GalleryImageInner> listByGallery(final String resourceGroupName, final String galleryName) { ServiceResponse<Page<GalleryImageInner>> response = listByGallerySinglePageAsync(resourceGroupName, galleryName).toBlocking().single(); return new PagedList<GalleryImageInner>(response.body()) { @Override public Page<GalleryImageInner> nextPage(String nextPageLink) { return listByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
List gallery Image Definitions in a gallery.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which Image Definitions are to be listed.
  • serviceCallback – the async ServiceCallback to handle successful and failed responses.
Throws:
Returns:the ServiceFuture object
/** * List gallery Image Definitions in a gallery. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be listed. * @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<GalleryImageInner>> listByGalleryAsync(final String resourceGroupName, final String galleryName, final ListOperationCallback<GalleryImageInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByGallerySinglePageAsync(resourceGroupName, galleryName), new Func1<String, Observable<ServiceResponse<Page<GalleryImageInner>>>>() { @Override public Observable<ServiceResponse<Page<GalleryImageInner>>> call(String nextPageLink) { return listByGalleryNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
List gallery Image Definitions in a gallery.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which Image Definitions are to be listed.
Throws:
Returns:the observable to the PagedList<GalleryImageInner> object
/** * List gallery Image Definitions in a gallery. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be listed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;GalleryImageInner&gt; object */
public Observable<Page<GalleryImageInner>> listByGalleryAsync(final String resourceGroupName, final String galleryName) { return listByGalleryWithServiceResponseAsync(resourceGroupName, galleryName) .map(new Func1<ServiceResponse<Page<GalleryImageInner>>, Page<GalleryImageInner>>() { @Override public Page<GalleryImageInner> call(ServiceResponse<Page<GalleryImageInner>> response) { return response.body(); } }); }
List gallery Image Definitions in a gallery.
Params:
  • resourceGroupName – The name of the resource group.
  • galleryName – The name of the Shared Image Gallery from which Image Definitions are to be listed.
Throws:
Returns:the observable to the PagedList<GalleryImageInner> object
/** * List gallery Image Definitions in a gallery. * * @param resourceGroupName The name of the resource group. * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be listed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList&lt;GalleryImageInner&gt; object */
public Observable<ServiceResponse<Page<GalleryImageInner>>> listByGalleryWithServiceResponseAsync(final String resourceGroupName, final String galleryName) { return listByGallerySinglePageAsync(resourceGroupName, galleryName) .concatMap(new Func1<ServiceResponse<Page<GalleryImageInner>>, Observable<ServiceResponse<Page<GalleryImageInner>>>>() { @Override public Observable<ServiceResponse<Page<GalleryImageInner>>> call(ServiceResponse<Page<GalleryImageInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByGalleryNextWithServiceResponseAsync(nextPageLink)); } }); }
List gallery Image Definitions in a gallery. ServiceResponse> * @param resourceGroupName The name of the resource group. ServiceResponse> * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be listed.
Throws:
Returns:the PagedList<GalleryImageInner> object wrapped in ServiceResponse if successful.
/** * List gallery Image Definitions in a gallery. * ServiceResponse<PageImpl1<GalleryImageInner>> * @param resourceGroupName The name of the resource group. ServiceResponse<PageImpl1<GalleryImageInner>> * @param galleryName The name of the Shared Image Gallery from which Image Definitions are to be listed. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;GalleryImageInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<GalleryImageInner>>> listByGallerySinglePageAsync(final String resourceGroupName, final String galleryName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (galleryName == null) { throw new IllegalArgumentException("Parameter galleryName is required and cannot be null."); } final String apiVersion = "2019-12-01"; return service.listByGallery(this.client.subscriptionId(), resourceGroupName, galleryName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<GalleryImageInner>>>>() { @Override public Observable<ServiceResponse<Page<GalleryImageInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<GalleryImageInner>> result = listByGalleryDelegate(response); return Observable.just(new ServiceResponse<Page<GalleryImageInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<GalleryImageInner>> listByGalleryDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<GalleryImageInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<GalleryImageInner>>() { }.getType()) .registerError(CloudException.class) .build(response); }
List gallery Image Definitions in a gallery.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<GalleryImageInner> object if successful.
/** * List gallery Image Definitions in a gallery. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException 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;GalleryImageInner&gt; object if successful. */
public PagedList<GalleryImageInner> listByGalleryNext(final String nextPageLink) { ServiceResponse<Page<GalleryImageInner>> response = listByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList<GalleryImageInner>(response.body()) { @Override public Page<GalleryImageInner> nextPage(String nextPageLink) { return listByGalleryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; }
List gallery Image Definitions in a gallery.
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
/** * List gallery Image Definitions in a gallery. * * @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<GalleryImageInner>> listByGalleryNextAsync(final String nextPageLink, final ServiceFuture<List<GalleryImageInner>> serviceFuture, final ListOperationCallback<GalleryImageInner> serviceCallback) { return AzureServiceFuture.fromPageResponse( listByGalleryNextSinglePageAsync(nextPageLink), new Func1<String, Observable<ServiceResponse<Page<GalleryImageInner>>>>() { @Override public Observable<ServiceResponse<Page<GalleryImageInner>>> call(String nextPageLink) { return listByGalleryNextSinglePageAsync(nextPageLink); } }, serviceCallback); }
List gallery Image Definitions in a gallery.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<GalleryImageInner> object
/** * List gallery Image Definitions in a gallery. * * @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;GalleryImageInner&gt; object */
public Observable<Page<GalleryImageInner>> listByGalleryNextAsync(final String nextPageLink) { return listByGalleryNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<GalleryImageInner>>, Page<GalleryImageInner>>() { @Override public Page<GalleryImageInner> call(ServiceResponse<Page<GalleryImageInner>> response) { return response.body(); } }); }
List gallery Image Definitions in a gallery.
Params:
  • nextPageLink – The NextLink from the previous successful call to List operation.
Throws:
Returns:the observable to the PagedList<GalleryImageInner> object
/** * List gallery Image Definitions in a gallery. * * @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;GalleryImageInner&gt; object */
public Observable<ServiceResponse<Page<GalleryImageInner>>> listByGalleryNextWithServiceResponseAsync(final String nextPageLink) { return listByGalleryNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<GalleryImageInner>>, Observable<ServiceResponse<Page<GalleryImageInner>>>>() { @Override public Observable<ServiceResponse<Page<GalleryImageInner>>> call(ServiceResponse<Page<GalleryImageInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByGalleryNextWithServiceResponseAsync(nextPageLink)); } }); }
List gallery Image Definitions in a gallery. ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
Throws:
Returns:the PagedList<GalleryImageInner> object wrapped in ServiceResponse if successful.
/** * List gallery Image Definitions in a gallery. * ServiceResponse<PageImpl1<GalleryImageInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;GalleryImageInner&gt; object wrapped in {@link ServiceResponse} if successful. */
public Observable<ServiceResponse<Page<GalleryImageInner>>> listByGalleryNextSinglePageAsync(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.listByGalleryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<GalleryImageInner>>>>() { @Override public Observable<ServiceResponse<Page<GalleryImageInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl1<GalleryImageInner>> result = listByGalleryNextDelegate(response); return Observable.just(new ServiceResponse<Page<GalleryImageInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); } private ServiceResponse<PageImpl1<GalleryImageInner>> listByGalleryNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().<PageImpl1<GalleryImageInner>, CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken<PageImpl1<GalleryImageInner>>() { }.getType()) .registerError(CloudException.class) .build(response); } }