Class: Google::Apis::DlpV2::GooglePrivacyDlpV2BoundingBox

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

Overview

Bounding box encompassing detected text within an image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2BoundingBox

Returns a new instance of GooglePrivacyDlpV2BoundingBox.



473
474
475
# File 'lib/google/apis/dlp_v2/classes.rb', line 473

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

Instance Attribute Details

#heightFixnum

Height of the bounding box in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


456
457
458
# File 'lib/google/apis/dlp_v2/classes.rb', line 456

def height
  @height
end

#leftFixnum

Left coordinate of the bounding box. (0,0) is upper left. Corresponds to the JSON property left

Returns:

  • (Fixnum)


461
462
463
# File 'lib/google/apis/dlp_v2/classes.rb', line 461

def left
  @left
end

#topFixnum

Top coordinate of the bounding box. (0,0) is upper left. Corresponds to the JSON property top

Returns:

  • (Fixnum)


466
467
468
# File 'lib/google/apis/dlp_v2/classes.rb', line 466

def top
  @top
end

#widthFixnum

Width of the bounding box in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


471
472
473
# File 'lib/google/apis/dlp_v2/classes.rb', line 471

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



478
479
480
481
482
483
# File 'lib/google/apis/dlp_v2/classes.rb', line 478

def update!(**args)
  @height = args[:height] if args.key?(:height)
  @left = args[:left] if args.key?(:left)
  @top = args[:top] if args.key?(:top)
  @width = args[:width] if args.key?(:width)
end