class Azure::CognitiveServices::ImageSearch::V1_0::Models::ImageObject

Defines an image

Attributes

_type[RW]
accent_color[RW]

@return [String] A three-byte hexadecimal number that represents the color that dominates the image. Use the color as the temporary background in your client until the image is loaded.

image_id[RW]

@return [String] Unique Id for the image

image_insights_token[RW]

@return [String] The token that you use in a subsequent call to the Image Search API to get additional information about the image. For information about using this token, see the insightsToken query parameter.

insights_metadata[RW]

@return [ImagesImageMetadata] A count of the number of websites where 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 imageInsightsToken to get the list of websites.

thumbnail[RW]

@return [ImageObject] The URL to a thumbnail of the image

visual_words[RW]

@return [String] Visual representation of the image. Used for getting more sizes

Private Class Methods

mapper() click to toggle source

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

# 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
new() click to toggle source
# File lib/1.0/generated/azure_cognitiveservices_imagesearch/models/image_object.rb, line 16
def initialize
  @_type = "ImageObject"
end