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.



2511
2512
2513
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2511

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)


2504
2505
2506
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2504

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)


2509
2510
2511
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2509

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2516
2517
2518
2519
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2516

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