Class: Google::Apis::VisionV1::ImageAnnotationContext

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/vision_v1/classes.rb,
generated/google/apis/vision_v1/representations.rb,
generated/google/apis/vision_v1/representations.rb

Overview

If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ImageAnnotationContext

Returns a new instance of ImageAnnotationContext.



9013
9014
9015
# File 'generated/google/apis/vision_v1/classes.rb', line 9013

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#page_numberFixnum

If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image. Corresponds to the JSON property pageNumber

Returns:

  • (Fixnum)


9006
9007
9008
# File 'generated/google/apis/vision_v1/classes.rb', line 9006

def page_number
  @page_number
end

#uriString

The URI of the file used to produce the image. Corresponds to the JSON property uri

Returns:

  • (String)


9011
9012
9013
# File 'generated/google/apis/vision_v1/classes.rb', line 9011

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9018
9019
9020
9021
# File 'generated/google/apis/vision_v1/classes.rb', line 9018

def update!(**args)
  @page_number = args[:page_number] if args.key?(:page_number)
  @uri = args[:uri] if args.key?(:uri)
end