code: public Observable<ServiceResponse<SearchResponse>> searchWithServiceResponseAsync(long customConfig, String query, SearchOptionalParameter searchOptionalParameter) {
          if (query == null) {
              throw new IllegalArgumentException("Parameter query is required and cannot be null.");
          }
          final String acceptLanguage = searchOptionalParameter != null ? searchOptionalParameter.acceptLanguage() : null;
          final String userAgent = searchOptionalParameter != null ? searchOptionalParameter.userAgent() : this.client.userAgent();
          final String clientId = searchOptionalParameter != null ? searchOptionalParameter.clientId() : null;
          final String clientIp = searchOptionalParameter != null ? searchOptionalParameter.clientIp() : null;
          final String location = searchOptionalParameter != null ? searchOptionalParameter.location() : null;
          final String countryCode = searchOptionalParameter != null ? searchOptionalParameter.countryCode() : null;
          final Integer count = searchOptionalParameter != null ? searchOptionalParameter.count() : null;
          final String market = searchOptionalParameter != null ? searchOptionalParameter.market() : null;
          final Integer offset = searchOptionalParameter != null ? searchOptionalParameter.offset() : null;
          final SafeSearch safeSearch = searchOptionalParameter != null ? searchOptionalParameter.safeSearch() : null;
          final String setLang = searchOptionalParameter != null ? searchOptionalParameter.setLang() : null;
          final Boolean textDecorations = searchOptionalParameter != null ? searchOptionalParameter.textDecorations() : null;
          final TextFormat textFormat = searchOptionalParameter != null ? searchOptionalParameter.textFormat() : null;
  
          return searchWithServiceResponseAsync(customConfig, query, acceptLanguage, userAgent, clientId, clientIp, location, countryCode, count, market, offset, safeSearch, setLang, textDecorations, textFormat);
      }
docs: The Custom Search API lets you send a search query to Bing and get back web pages found in your custom view of the web.
  
  @param customConfig The identifier for the custom search configuration
  @param query The user's search query term. The term may not be empty. The term may contain Bing Advanced Operators. For example, to limit results to a specific domain, use the site: operator.
  @param searchOptionalParameter 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 SearchResponse object