Class: Azure::CognitiveServices::ImageSearch::V1_0::Models::Query

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb

Overview

Defines a search query.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#display_textString

the query term may contain special characters that highlight the search term found in the query string. The string contains the highlighting characters only if the query enabled hit highlighting

Returns:

  • (String)

    The display version of the query term. This version of



23
24
25
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb', line 23

def display_text
  @display_text
end

search. Before using the URL, you must append query parameters as appropriate and include the Ocp-Apim-Subscription-Key header. Use this URL if you’re displaying the results in your own user interface. Otherwise, use the webSearchUrl URL.

Returns:

  • (String)

    The URL that you use to get the results of the related



34
35
36
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb', line 34

def search_link
  @search_link
end

#textString

a new search request.

Returns:

  • (String)

    The query string. Use this string as the query term in



17
18
19
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb', line 17

def text
  @text
end

#thumbnailImageObject

Returns The URL to a thumbnail of a related image.

Returns:

  • (ImageObject)

    The URL to a thumbnail of a related image.



37
38
39
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb', line 37

def thumbnail
  @thumbnail
end

#web_search_urlString

page for the query.Only related search results include this field.

Returns:

  • (String)

    The URL that takes the user to the Bing search results



27
28
29
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb', line 27

def web_search_url
  @web_search_url
end

Class Method Details

.mapperObject

Mapper for Query class as Ruby Hash. This will be used for serialization/deserialization.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/query.rb', line 44

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'Query',
    type: {
      name: 'Composite',
      class_name: 'Query',
      model_properties: {
        text: {
          client_side_validation: true,
          required: true,
          serialized_name: 'text',
          type: {
            name: 'String'
          }
        },
        display_text: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'displayText',
          type: {
            name: 'String'
          }
        },
        web_search_url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'webSearchUrl',
          type: {
            name: 'String'
          }
        },
        search_link: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'searchLink',
          type: {
            name: 'String'
          }
        },
        thumbnail: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'thumbnail',
          type: {
            name: 'Composite',
            class_name: 'ImageObject'
          }
        }
      }
    }
  }
end