Class: Google::Apis::TranslateV2::DetectionsResource
- Inherits:
-
Object
- Object
- Google::Apis::TranslateV2::DetectionsResource
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/translate_v2/classes.rb,
generated/google/apis/translate_v2/representations.rb,
generated/google/apis/translate_v2/representations.rb
Instance Attribute Summary collapse
-
#confidence ⇒ Float
The confidence of the detection result of this language.
-
#is_reliable ⇒ Boolean
(also: #is_reliable?)
A boolean to indicate is the language detection result reliable.
-
#language ⇒ String
The language we detected.
Instance Method Summary collapse
-
#initialize(**args) ⇒ DetectionsResource
constructor
A new instance of DetectionsResource.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ DetectionsResource
Returns a new instance of DetectionsResource
67 68 69 |
# File 'generated/google/apis/translate_v2/classes.rb', line 67 def initialize(**args) update!(**args) end |
Instance Attribute Details
#confidence ⇒ Float
The confidence of the detection result of this language.
Corresponds to the JSON property confidence
54 55 56 |
# File 'generated/google/apis/translate_v2/classes.rb', line 54 def confidence @confidence end |
#is_reliable ⇒ Boolean Also known as: is_reliable?
A boolean to indicate is the language detection result reliable.
Corresponds to the JSON property isReliable
64 65 66 |
# File 'generated/google/apis/translate_v2/classes.rb', line 64 def is_reliable @is_reliable end |
#language ⇒ String
The language we detected.
Corresponds to the JSON property language
59 60 61 |
# File 'generated/google/apis/translate_v2/classes.rb', line 59 def language @language end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
72 73 74 75 76 |
# File 'generated/google/apis/translate_v2/classes.rb', line 72 def update!(**args) @confidence = args[:confidence] if args.key?(:confidence) @language = args[:language] if args.key?(:language) @is_reliable = args[:is_reliable] if args.key?(:is_reliable) end |