code: public Observable<ServiceResponse<NameAvailabilityInner>> executeWithServiceResponseAsync(NameAvailabilityRequest nameAvailabilityRequest) {
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          if (nameAvailabilityRequest == null) {
              throw new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.");
          }
          Validator.validate(nameAvailabilityRequest);
          return service.execute(this.client.subscriptionId(), this.client.apiVersion(), nameAvailabilityRequest, this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<NameAvailabilityInner>>>() {
                  @Override
                  public Observable<ServiceResponse<NameAvailabilityInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<NameAvailabilityInner> clientResponse = executeDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Check the availability of name for resource.
  
  @param nameAvailabilityRequest The required parameters for checking if resource name is available.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the NameAvailabilityInner object