code: public Observable<ServiceResponse<List<VirtualMachineSizeInner>>> listAvailableSizesWithServiceResponseAsync(String resourceGroupName, String vmName) {
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (vmName == null) {
              throw new IllegalArgumentException("Parameter vmName is required and cannot be null.");
          }
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          return service.listAvailableSizes(resourceGroupName, vmName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<VirtualMachineSizeInner>>>>() {
                  @Override
                  public Observable<ServiceResponse<List<VirtualMachineSizeInner>>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<PageImpl<VirtualMachineSizeInner>> result = listAvailableSizesDelegate(response);
                          List<VirtualMachineSizeInner> items = null;
                          if (result.body() != null) {
                              items = result.body().items();
                          }
                          ServiceResponse<List<VirtualMachineSizeInner>> clientResponse = new ServiceResponse<List<VirtualMachineSizeInner>>(items, result.response());
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Lists all available virtual machine sizes to which the specified virtual machine can be resized.
  
  @param resourceGroupName The name of the resource group.
  @param vmName The name of the virtual machine.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the List&lt;VirtualMachineSizeInner&gt; object