Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Segment

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

Overview

A segment of the content.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Segment

Returns a new instance of GoogleCloudAiplatformV1Segment.



42612
42613
42614
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 42612

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

Instance Attribute Details

#end_indexFixnum

Output only. The end index of the segment in the Part, measured in bytes. This marks the end of the segment and is exclusive, meaning the segment includes content up to, but not including, the byte at this index. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


42592
42593
42594
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 42592

def end_index
  @end_index
end

#part_indexFixnum

Output only. The index of the Part object that this segment belongs to. This is useful for associating the segment with a specific part of the content. Corresponds to the JSON property partIndex

Returns:

  • (Fixnum)


42598
42599
42600
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 42598

def part_index
  @part_index
end

#start_indexFixnum

Output only. The start index of the segment in the Part, measured in bytes. This marks the beginning of the segment and is inclusive, meaning the byte at this index is the first byte of the segment. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


42605
42606
42607
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 42605

def start_index
  @start_index
end

#textString

Output only. The text of the segment. Corresponds to the JSON property text

Returns:

  • (String)


42610
42611
42612
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 42610

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



42617
42618
42619
42620
42621
42622
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 42617

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @part_index = args[:part_index] if args.key?(:part_index)
  @start_index = args[:start_index] if args.key?(:start_index)
  @text = args[:text] if args.key?(:text)
end