code: public Observable<ServiceResponse<QueryResponseInner>> resourcesWithServiceResponseAsync(QueryRequest query) {
          if (this.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null.");
          }
          if (query == null) {
              throw new IllegalArgumentException("Parameter query is required and cannot be null.");
          }
          Validator.validate(query);
          return service.resources(this.apiVersion(), query, this.acceptLanguage(), this.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<QueryResponseInner>>>() {
                  @Override
                  public Observable<ServiceResponse<QueryResponseInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<QueryResponseInner> clientResponse = resourcesDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Queries the resources managed by Azure Resource Manager for all subscriptions specified in the request.
  
  @param query Request specifying query and its options.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the QueryResponseInner object