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.



508
509
510
# File 'lib/google/apis/places_v1/classes.rb', line 508

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



501
502
503
# File 'lib/google/apis/places_v1/classes.rb', line 501

def matches
  @matches
end

#textString

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

Returns:

  • (String)


506
507
508
# File 'lib/google/apis/places_v1/classes.rb', line 506

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



513
514
515
516
# File 'lib/google/apis/places_v1/classes.rb', line 513

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