Class: Google::Apis::LanguageV1beta1::TextSpan
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1beta1::TextSpan
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/language_v1beta1/classes.rb,
generated/google/apis/language_v1beta1/representations.rb,
generated/google/apis/language_v1beta1/representations.rb
Overview
Represents an output piece of text.
Instance Attribute Summary collapse
-
#begin_offset ⇒ Fixnum
The API calculates the beginning offset of the content in the original document according to the EncodingType specified in the API request.
-
#content ⇒ String
The content of the output text.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TextSpan
constructor
A new instance of TextSpan.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ TextSpan
Returns a new instance of TextSpan
77 78 79 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 77 def initialize(**args) update!(**args) end |
Instance Attribute Details
#begin_offset ⇒ Fixnum
The API calculates the beginning offset of the content in the original
document according to the EncodingType specified in the API request.
Corresponds to the JSON property beginOffset
75 76 77 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 75 def begin_offset @begin_offset end |
#content ⇒ String
The content of the output text.
Corresponds to the JSON property content
69 70 71 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 69 def content @content end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
82 83 84 85 |
# File 'generated/google/apis/language_v1beta1/classes.rb', line 82 def update!(**args) @content = args[:content] if args.key?(:content) @begin_offset = args[:begin_offset] if args.key?(:begin_offset) end |