Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentPageAnchorPageRef

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

Overview

Represents a weak reference to a page element within a document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1DocumentPageAnchorPageRef

Returns a new instance of GoogleCloudDocumentaiV1DocumentPageAnchorPageRef.



1235
1236
1237
# File 'lib/google/apis/documentai_v1/classes.rb', line 1235

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

Instance Attribute Details

#bounding_polyGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1BoundingPoly

A bounding polygon for the detected image annotation. Corresponds to the JSON property boundingPoly



1210
1211
1212
# File 'lib/google/apis/documentai_v1/classes.rb', line 1210

def bounding_poly
  @bounding_poly
end

#confidenceFloat

Optional. Confidence of detected page element, if applicable. Range [0, 1]. Corresponds to the JSON property confidence

Returns:

  • (Float)


1215
1216
1217
# File 'lib/google/apis/documentai_v1/classes.rb', line 1215

def confidence
  @confidence
end

#layout_idString

Optional. Deprecated. Use PageRef.bounding_poly instead. Corresponds to the JSON property layoutId

Returns:

  • (String)


1220
1221
1222
# File 'lib/google/apis/documentai_v1/classes.rb', line 1220

def layout_id
  @layout_id
end

#layout_typeString

Optional. The type of the layout element that is being referenced if any. Corresponds to the JSON property layoutType

Returns:

  • (String)


1225
1226
1227
# File 'lib/google/apis/documentai_v1/classes.rb', line 1225

def layout_type
  @layout_type
end

#pageFixnum

Required. Index into the Document.pages element, for example using Document. pages to locate the related page element. This field is skipped when its value is the default 0. See https://developers.google.com/protocol-buffers/docs/ proto3#json. Corresponds to the JSON property page

Returns:

  • (Fixnum)


1233
1234
1235
# File 'lib/google/apis/documentai_v1/classes.rb', line 1233

def page
  @page
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1240
1241
1242
1243
1244
1245
1246
# File 'lib/google/apis/documentai_v1/classes.rb', line 1240

def update!(**args)
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
  @confidence = args[:confidence] if args.key?(:confidence)
  @layout_id = args[:layout_id] if args.key?(:layout_id)
  @layout_type = args[:layout_type] if args.key?(:layout_type)
  @page = args[:page] if args.key?(:page)
end