Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText

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

Text representing a Place or query prediction. The text may be used as is or formatted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText

Returns a new instance of GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText.



364
365
366
# File 'lib/google/apis/places_v1/classes.rb', line 364

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

Instance Attribute Details

#matchesArray<Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange>

A list of string ranges identifying where the input request matched in text. The ranges can be used to format specific parts of text. The substrings may not be exact matches of input if the matching was determined by criteria other than string matching (for example, spell corrections or transliterations) . These values are Unicode character offsets of text. The ranges are guaranteed to be ordered in increasing offset values. Corresponds to the JSON property matches



357
358
359
# File 'lib/google/apis/places_v1/classes.rb', line 357

def matches
  @matches
end

#textString

Text that may be used as is or formatted with matches. Corresponds to the JSON property text

Returns:

  • (String)


362
363
364
# File 'lib/google/apis/places_v1/classes.rb', line 362

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



369
370
371
372
# File 'lib/google/apis/places_v1/classes.rb', line 369

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