Class: Google::Apis::CloudsearchV1::AppsDynamiteSharedTextSegment

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

Overview

Defines a segment in a text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AppsDynamiteSharedTextSegment

Returns a new instance of AppsDynamiteSharedTextSegment.



2569
2570
2571
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2569

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

Instance Attribute Details

#lengthFixnum

Length of the segment in the text. Corresponds to the JSON property length

Returns:

  • (Fixnum)


2562
2563
2564
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2562

def length
  @length
end

#start_indexFixnum

Start index (0-indexed and inclusive) of the segment in the text. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


2567
2568
2569
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2567

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2574
2575
2576
2577
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2574

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