class Azure::CognitiveServices::VisualSearch::V1_0::Models::ImageInfo

A JSON object that identities the image to get insights of . It also includes the optional crop area that you use to identify the region of interest in the image.

Attributes

crop_area[RW]

@return [CropArea] A JSON object consisting of coordinates specifying the four corners of a cropped rectangle within the input image. Use the crop area to identify the region of interest in the image. You can apply the crop area to the images specified using the imageInsightsToken or url fields, or an image binary specified in an image form data.

image_insights_token[RW]

@return [String] An image insights token. To get the insights token, call one of the Image Search APIs (for example, /images/search). In the search results, the [Image](docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image) object's [imageInsightsToken](docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-images-api-v7-reference#image-imageinsightstoken) field contains the token. The imageInsightsToken and url fields mutually exclusive; do not specify both. Do not specify an insights token if the request includes the image form data.

url[RW]

@return [String] The URL of the input image. The imageInsightsToken and url fields are mutually exclusive; do not specify both. Do not specify the URL if the request includes the image form data.

Private Class Methods

mapper() click to toggle source

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

# File lib/1.0/generated/azure_cognitiveservices_visualsearch/models/image_info.rb, line 46
def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'ImageInfo',
    type: {
      name: 'Composite',
      class_name: 'ImageInfo',
      model_properties: {
        image_insights_token: {
          client_side_validation: true,
          required: false,
          serialized_name: 'imageInsightsToken',
          type: {
            name: 'String'
          }
        },
        url: {
          client_side_validation: true,
          required: false,
          serialized_name: 'url',
          type: {
            name: 'String'
          }
        },
        crop_area: {
          client_side_validation: true,
          required: false,
          serialized_name: 'cropArea',
          type: {
            name: 'Composite',
            class_name: 'CropArea'
          }
        }
      }
    }
  }
end