Class: Azure::CognitiveServices::ImageSearch::V1_0::Models::ImageObject

Inherits:
MediaObject show all
Includes:
MsRestAzure
Defined in:
lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb

Overview

Defines an image

Instance Attribute Summary collapse

Attributes inherited from MediaObject

#content_size, #content_url, #encoding_format, #height, #host_page_display_url, #host_page_url, #width

Attributes inherited from CreativeWork

#date_published, #provider, #text, #thumbnail_url

Attributes inherited from Thing

#alternate_name, #bing_id, #description, #image, #name, #url

Attributes inherited from Response

#read_link, #web_search_url

Attributes inherited from Identifiable

#id

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeImageObject

Returns a new instance of ImageObject.



16
17
18
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 16

def initialize
  @_type = "ImageObject"
end

Instance Attribute Details

#_typeObject

Returns the value of attribute _type.



20
21
22
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 20

def _type
  @_type
end

#accent_colorString

color that dominates the image. Use the color as the temporary background in your client until the image is loaded.

Returns:

  • (String)

    A three-byte hexadecimal number that represents the



46
47
48
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 46

def accent_color
  @accent_color
end

#image_idString

Returns Unique Id for the image.

Returns:

  • (String)

    Unique Id for the image



41
42
43
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 41

def image_id
  @image_id
end

#image_insights_tokenString

Image Search API to get additional information about the image. For information about using this token, see the insightsToken query parameter.

Returns:

  • (String)

    The token that you use in a subsequent call to the



29
30
31
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 29

def image_insights_token
  @image_insights_token
end

#insights_metadataImagesImageMetadata

you can shop or perform other actions related to the image. For example, if the image is of an apple pie, this object includes a count of the number of websites where you can buy an apple pie. To indicate the number of offers in your UX, include badging such as a shopping cart icon that contains the count. When the user clicks on the icon, use imageInisghtsToken to get the list of websites.

Returns:



38
39
40
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 38

def 
  @insights_metadata
end

#thumbnailImageObject

Returns The URL to a thumbnail of the image.

Returns:

  • (ImageObject)

    The URL to a thumbnail of the image



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

def thumbnail
  @thumbnail
end

#visual_wordsString

more sizes

Returns:

  • (String)

    Visual representation of the image. Used for getting



50
51
52
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 50

def visual_words
  @visual_words
end

Class Method Details

.mapperObject

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



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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb', line 57

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'ImageObject',
    type: {
      name: 'Composite',
      class_name: 'ImageObject',
      model_properties: {
        _type: {
          client_side_validation: true,
          required: true,
          serialized_name: '_type',
          type: {
            name: 'String'
          }
        },
        id: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'id',
          type: {
            name: 'String'
          }
        },
        read_link: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'readLink',
          type: {
            name: 'String'
          }
        },
        web_search_url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'webSearchUrl',
          type: {
            name: 'String'
          }
        },
        name: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'name',
          type: {
            name: 'String'
          }
        },
        url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'url',
          type: {
            name: 'String'
          }
        },
        image: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'image',
          type: {
            name: 'Composite',
            class_name: 'ImageObject'
          }
        },
        description: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'description',
          type: {
            name: 'String'
          }
        },
        alternate_name: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'alternateName',
          type: {
            name: 'String'
          }
        },
        bing_id: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'bingId',
          type: {
            name: 'String'
          }
        },
        thumbnail_url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'thumbnailUrl',
          type: {
            name: 'String'
          }
        },
        provider: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'provider',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ThingElementType',
                type: {
                  name: 'Composite',
                  class_name: 'Thing'
                }
            }
          }
        },
        date_published: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'datePublished',
          type: {
            name: 'String'
          }
        },
        text: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'text',
          type: {
            name: 'String'
          }
        },
        content_url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'contentUrl',
          type: {
            name: 'String'
          }
        },
        host_page_url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'hostPageUrl',
          type: {
            name: 'String'
          }
        },
        content_size: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'contentSize',
          type: {
            name: 'String'
          }
        },
        encoding_format: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'encodingFormat',
          type: {
            name: 'String'
          }
        },
        host_page_display_url: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'hostPageDisplayUrl',
          type: {
            name: 'String'
          }
        },
        width: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'width',
          type: {
            name: 'Number'
          }
        },
        height: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'height',
          type: {
            name: 'Number'
          }
        },
        thumbnail: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'thumbnail',
          type: {
            name: 'Composite',
            class_name: 'ImageObject'
          }
        },
        image_insights_token: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'imageInsightsToken',
          type: {
            name: 'String'
          }
        },
        insights_metadata: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'insightsMetadata',
          type: {
            name: 'Composite',
            class_name: 'ImagesImageMetadata'
          }
        },
        image_id: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'imageId',
          type: {
            name: 'String'
          }
        },
        accent_color: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'accentColor',
          type: {
            name: 'String'
          }
        },
        visual_words: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'visualWords',
          type: {
            name: 'String'
          }
        }
      }
    }
  }
end