Class: Google::Apis::VideointelligenceV1p2beta1::GoogleCloudVideointelligenceV1p2beta1DetectedAttribute

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

Overview

A generic detected attribute represented by name in string format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudVideointelligenceV1p2beta1DetectedAttribute

Returns a new instance of GoogleCloudVideointelligenceV1p2beta1DetectedAttribute.



3587
3588
3589
# File 'lib/google/apis/videointelligence_v1p2beta1/classes.rb', line 3587

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

Instance Attribute Details

#confidenceFloat

Detected attribute confidence. Range [0, 1]. Corresponds to the JSON property confidence

Returns:

  • (Float)


3573
3574
3575
# File 'lib/google/apis/videointelligence_v1p2beta1/classes.rb', line 3573

def confidence
  @confidence
end

#nameString

The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document. Corresponds to the JSON property name

Returns:

  • (String)


3579
3580
3581
# File 'lib/google/apis/videointelligence_v1p2beta1/classes.rb', line 3579

def name
  @name
end

#valueString

Text value of the detection result. For example, the value for "HairColor" can be "black", "blonde", etc. Corresponds to the JSON property value

Returns:

  • (String)


3585
3586
3587
# File 'lib/google/apis/videointelligence_v1p2beta1/classes.rb', line 3585

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3592
3593
3594
3595
3596
# File 'lib/google/apis/videointelligence_v1p2beta1/classes.rb', line 3592

def update!(**args)
  @confidence = args[:confidence] if args.key?(:confidence)
  @name = args[:name] if args.key?(:name)
  @value = args[:value] if args.key?(:value)
end