code: public Observable<ServiceResponse<CheckNameAvailabilityResponseInner>> checkNameAvailabilityLocalWithServiceResponseAsync(String location, CheckNameAvailabilityRequest checkNameAvailability) {
          if (this.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null.");
          }
          if (location == null) {
              throw new IllegalArgumentException("Parameter location is required and cannot be null.");
          }
          if (checkNameAvailability == null) {
              throw new IllegalArgumentException("Parameter checkNameAvailability is required and cannot be null.");
          }
          if (this.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
          }
          Validator.validate(checkNameAvailability);
          return service.checkNameAvailabilityLocal(this.subscriptionId(), location, checkNameAvailability, this.apiVersion(), this.acceptLanguage(), this.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<CheckNameAvailabilityResponseInner>>>() {
                  @Override
                  public Observable<ServiceResponse<CheckNameAvailabilityResponseInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<CheckNameAvailabilityResponseInner> clientResponse = checkNameAvailabilityLocalDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Check Name Availability for global uniqueness.
  
  @param location The location in which uniqueness will be verified.
  @param checkNameAvailability Check Name Availability Request.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the CheckNameAvailabilityResponseInner object