Class: Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1beta2DetectedAttribute

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

Overview

A generic detected attribute represented by name in string format.

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) ⇒ GoogleCloudVideointelligenceV1beta2DetectedAttribute

Returns a new instance of GoogleCloudVideointelligenceV1beta2DetectedAttribute.



1511
1512
1513
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 1511

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

Instance Attribute Details

#confidenceFloat

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

Returns:

  • (Float)


1497
1498
1499
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 1497

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)


1503
1504
1505
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 1503

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)


1509
1510
1511
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 1509

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1516
1517
1518
1519
1520
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 1516

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