public Observable<ServiceResponse<Images>> imageSearchWithServiceResponseAsync(long customConfig, String query, ImageSearchOptionalParameter imageSearchOptionalParameter) {
        if (query == null) {
            throw new IllegalArgumentException("Parameter query is required and cannot be null.");
        }
        final String acceptLanguage = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.acceptLanguage() : null;
        final String userAgent = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.userAgent() : this.client.userAgent();
        final String clientId = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.clientId() : null;
        final String clientIp = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.clientIp() : null;
        final String location = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.location() : null;
        final ImageAspect aspect = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.aspect() : null;
        final ImageColor color = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.color() : null;
        final String countryCode = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.countryCode() : null;
        final Integer count = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.count() : null;
        final Freshness freshness = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.freshness() : null;
        final Integer height = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.height() : null;
        final String id = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.id() : null;
        final ImageContent imageContent = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.imageContent() : null;
        final ImageType imageType = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.imageType() : null;
        final ImageLicense license = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.license() : null;
        final String market = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.market() : null;
        final Long maxFileSize = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.maxFileSize() : null;
        final Long maxHeight = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.maxHeight() : null;
        final Long maxWidth = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.maxWidth() : null;
        final Long minFileSize = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.minFileSize() : null;
        final Long minHeight = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.minHeight() : null;
        final Long minWidth = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.minWidth() : null;
        final Long offset = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.offset() : null;
        final SafeSearch safeSearch = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.safeSearch() : null;
        final ImageSize size = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.size() : null;
        final String setLang = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.setLang() : null;
        final Integer width = imageSearchOptionalParameter != null ? imageSearchOptionalParameter.width() : null;

        return imageSearchWithServiceResponseAsync(customConfig, query, acceptLanguage, userAgent, clientId, clientIp, location, aspect, color, countryCode, count, freshness, height, id, imageContent, imageType, license, market, maxFileSize, maxHeight, maxWidth, minFileSize, minHeight, minWidth, offset, safeSearch, size, setLang, width);
    }
public Observable < ServiceResponse < Images > > imageSearchWithServiceResponseAsync ( long customConfig , String query , ImageSearchOptionalParameter imageSearchOptionalParameter ) { if ( query == null ) { throw new IllegalArgumentException ( "Parameter query is required and cannot be null." ) ; } final String acceptLanguage = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . acceptLanguage ( ) : null ; final String userAgent = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . userAgent ( ) : this . client . userAgent ( ) ; final String clientId = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . clientId ( ) : null ; final String clientIp = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . clientIp ( ) : null ; final String location = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . location ( ) : null ; final ImageAspect aspect = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . aspect ( ) : null ; final ImageColor color = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . color ( ) : null ; final String countryCode = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . countryCode ( ) : null ; final Integer count = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . count ( ) : null ; final Freshness freshness = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . freshness ( ) : null ; final Integer height = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . height ( ) : null ; final String id = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . id ( ) : null ; final ImageContent imageContent = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . imageContent ( ) : null ; final ImageType imageType = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . imageType ( ) : null ; final ImageLicense license = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . license ( ) : null ; final String market = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . market ( ) : null ; final Long maxFileSize = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . maxFileSize ( ) : null ; final Long maxHeight = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . maxHeight ( ) : null ; final Long maxWidth = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . maxWidth ( ) : null ; final Long minFileSize = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . minFileSize ( ) : null ; final Long minHeight = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . minHeight ( ) : null ; final Long minWidth = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . minWidth ( ) : null ; final Long offset = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . offset ( ) : null ; final SafeSearch safeSearch = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . safeSearch ( ) : null ; final ImageSize size = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . size ( ) : null ; final String setLang = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . setLang ( ) : null ; final Integer width = imageSearchOptionalParameter != null ? imageSearchOptionalParameter . width ( ) : null ; return imageSearchWithServiceResponseAsync ( customConfig , query , acceptLanguage , userAgent , clientId , clientIp , location , aspect , color , countryCode , count , freshness , height , id , imageContent , imageType , license , market , maxFileSize , maxHeight , maxWidth , minFileSize , minHeight , minWidth , offset , safeSearch , size , setLang , width ) ; }
The Custom Image Search API lets you send an image search query to Bing and get image results 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 cannot be empty. The term may contain [Bing Advanced Operators](http://msdn.microsoft.com/library/ff795620.aspx). For example, to limit images to a specific domain, use the [site:](http://msdn.microsoft.com/library/ff795613.aspx) operator. To help improve relevance of an insights query (see [insightsToken](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#insightstoken)), you should always include the user's query term. Use this parameter only with the Image Search API.Do not specify this parameter when calling the Trending Images API.
@param imageSearchOptionalParameter 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 Images object