code: public Observable<ServiceResponse<Suggestions>> autoSuggestWithServiceResponseAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
          if (query == null) {
              throw new IllegalArgumentException("Parameter query is required and cannot be null.");
          }
          final String acceptLanguage = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.acceptLanguage() : null;
          final String pragma = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.pragma() : null;
          final String userAgent = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.userAgent() : this.client.userAgent();
          final String clientId = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.clientId() : null;
          final String clientIp = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.clientIp() : null;
          final String location = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.location() : null;
          final String countryCode = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.countryCode() : null;
          final String market = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.market() : null;
          final SafeSearch safeSearch = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.safeSearch() : null;
          final String setLang = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.setLang() : null;
          final List<ResponseFormat> responseFormat = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.responseFormat() : null;
  
          return autoSuggestWithServiceResponseAsync(query, acceptLanguage, pragma, userAgent, clientId, clientIp, location, countryCode, market, safeSearch, setLang, responseFormat);
      }
docs: The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
  
  @param query The user's search term.
  @param autoSuggestOptionalParameter the object representing the optional parameters to be set before calling this API
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the Suggestions object