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.



623
624
625
# File 'lib/google/apis/places_v1/classes.rb', line 623

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)


616
617
618
# File 'lib/google/apis/places_v1/classes.rb', line 616

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)


621
622
623
# File 'lib/google/apis/places_v1/classes.rb', line 621

def start_offset
  @start_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



628
629
630
631
# File 'lib/google/apis/places_v1/classes.rb', line 628

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