Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaTextSegment

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

Overview

The text segment inside of DataItem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1SchemaTextSegment

Returns a new instance of GoogleCloudAiplatformV1beta1SchemaTextSegment.



56031
56032
56033
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 56031

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

Instance Attribute Details

#contentString

The text content in the segment for output only. Corresponds to the JSON property content

Returns:

  • (String)


56016
56017
56018
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 56016

def content
  @content
end

#end_offsetFixnum

Zero-based character index of the first character past the end of the text segment (counting character from the beginning of the text). The character at the end_offset is NOT included in the text segment. Corresponds to the JSON property endOffset

Returns:

  • (Fixnum)


56023
56024
56025
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 56023

def end_offset
  @end_offset
end

#start_offsetFixnum

Zero-based character index of the first character of the text segment ( counting characters from the beginning of the text). Corresponds to the JSON property startOffset

Returns:

  • (Fixnum)


56029
56030
56031
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 56029

def start_offset
  @start_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



56036
56037
56038
56039
56040
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 56036

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @end_offset = args[:end_offset] if args.key?(:end_offset)
  @start_offset = args[:start_offset] if args.key?(:start_offset)
end