Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange

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

Overview

Identifies a substring within a given text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange

Returns a new instance of GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange.



479
480
481
# File 'lib/google/apis/places_v1/classes.rb', line 479

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

Instance Attribute Details

#end_offsetFixnum

Zero-based offset of the last Unicode character (exclusive). Corresponds to the JSON property endOffset

Returns:

  • (Fixnum)


472
473
474
# File 'lib/google/apis/places_v1/classes.rb', line 472

def end_offset
  @end_offset
end

#start_offsetFixnum

Zero-based offset of the first Unicode character of the string (inclusive). Corresponds to the JSON property startOffset

Returns:

  • (Fixnum)


477
478
479
# File 'lib/google/apis/places_v1/classes.rb', line 477

def start_offset
  @start_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



484
485
486
487
# File 'lib/google/apis/places_v1/classes.rb', line 484

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