public Observable<ServiceResponse<ImageInsights>> detailsWithServiceResponseAsync(String query, DetailsOptionalParameter detailsOptionalParameter) {
        if (query == null) {
            throw new IllegalArgumentException("Parameter query is required and cannot be null.");
        }
        final String acceptLanguage = detailsOptionalParameter != null ? detailsOptionalParameter.acceptLanguage() : null;
        final String contentType = detailsOptionalParameter != null ? detailsOptionalParameter.contentType() : null;
        final String userAgent = detailsOptionalParameter != null ? detailsOptionalParameter.userAgent() : this.client.userAgent();
        final String clientId = detailsOptionalParameter != null ? detailsOptionalParameter.clientId() : null;
        final String clientIp = detailsOptionalParameter != null ? detailsOptionalParameter.clientIp() : null;
        final String location = detailsOptionalParameter != null ? detailsOptionalParameter.location() : null;
        final Double cropBottom = detailsOptionalParameter != null ? detailsOptionalParameter.cropBottom() : null;
        final Double cropLeft = detailsOptionalParameter != null ? detailsOptionalParameter.cropLeft() : null;
        final Double cropRight = detailsOptionalParameter != null ? detailsOptionalParameter.cropRight() : null;
        final Double cropTop = detailsOptionalParameter != null ? detailsOptionalParameter.cropTop() : null;
        final ImageCropType cropType = detailsOptionalParameter != null ? detailsOptionalParameter.cropType() : null;
        final String countryCode = detailsOptionalParameter != null ? detailsOptionalParameter.countryCode() : null;
        final String id = detailsOptionalParameter != null ? detailsOptionalParameter.id() : null;
        final String imageUrl = detailsOptionalParameter != null ? detailsOptionalParameter.imageUrl() : null;
        final String insightsToken = detailsOptionalParameter != null ? detailsOptionalParameter.insightsToken() : null;
        final List<ImageInsightModule> modules = detailsOptionalParameter != null ? detailsOptionalParameter.modules() : null;
        final String market = detailsOptionalParameter != null ? detailsOptionalParameter.market() : null;
        final SafeSearch safeSearch = detailsOptionalParameter != null ? detailsOptionalParameter.safeSearch() : null;
        final String setLang = detailsOptionalParameter != null ? detailsOptionalParameter.setLang() : null;

        return detailsWithServiceResponseAsync(query, acceptLanguage, contentType, userAgent, clientId, clientIp, location, cropBottom, cropLeft, cropRight, cropTop, cropType, countryCode, id, imageUrl, insightsToken, modules, market, safeSearch, setLang);
    }
public Observable < ServiceResponse < ImageInsights > > detailsWithServiceResponseAsync ( String query , DetailsOptionalParameter detailsOptionalParameter ) { if ( query == null ) { throw new IllegalArgumentException ( "Parameter query is required and cannot be null." ) ; } final String acceptLanguage = detailsOptionalParameter != null ? detailsOptionalParameter . acceptLanguage ( ) : null ; final String contentType = detailsOptionalParameter != null ? detailsOptionalParameter . contentType ( ) : null ; final String userAgent = detailsOptionalParameter != null ? detailsOptionalParameter . userAgent ( ) : this . client . userAgent ( ) ; final String clientId = detailsOptionalParameter != null ? detailsOptionalParameter . clientId ( ) : null ; final String clientIp = detailsOptionalParameter != null ? detailsOptionalParameter . clientIp ( ) : null ; final String location = detailsOptionalParameter != null ? detailsOptionalParameter . location ( ) : null ; final Double cropBottom = detailsOptionalParameter != null ? detailsOptionalParameter . cropBottom ( ) : null ; final Double cropLeft = detailsOptionalParameter != null ? detailsOptionalParameter . cropLeft ( ) : null ; final Double cropRight = detailsOptionalParameter != null ? detailsOptionalParameter . cropRight ( ) : null ; final Double cropTop = detailsOptionalParameter != null ? detailsOptionalParameter . cropTop ( ) : null ; final ImageCropType cropType = detailsOptionalParameter != null ? detailsOptionalParameter . cropType ( ) : null ; final String countryCode = detailsOptionalParameter != null ? detailsOptionalParameter . countryCode ( ) : null ; final String id = detailsOptionalParameter != null ? detailsOptionalParameter . id ( ) : null ; final String imageUrl = detailsOptionalParameter != null ? detailsOptionalParameter . imageUrl ( ) : null ; final String insightsToken = detailsOptionalParameter != null ? detailsOptionalParameter . insightsToken ( ) : null ; final List < ImageInsightModule > modules = detailsOptionalParameter != null ? detailsOptionalParameter . modules ( ) : null ; final String market = detailsOptionalParameter != null ? detailsOptionalParameter . market ( ) : null ; final SafeSearch safeSearch = detailsOptionalParameter != null ? detailsOptionalParameter . safeSearch ( ) : null ; final String setLang = detailsOptionalParameter != null ? detailsOptionalParameter . setLang ( ) : null ; return detailsWithServiceResponseAsync ( query , acceptLanguage , contentType , userAgent , clientId , clientIp , location , cropBottom , cropLeft , cropRight , cropTop , cropType , countryCode , id , imageUrl , insightsToken , modules , market , safeSearch , setLang ) ; }
The Image Detail Search API lets you search on Bing and get back insights about an image, such as webpages that include the image. This section provides technical details about the query parameters and headers that you use to request insights of images and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the Web for Images](https://docs.microsoft.com/azure/cognitive-services/bing-image-search/search-the-web).

@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 detailsOptionalParameter 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 ImageInsights object