Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat

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

Contains a breakdown of a Place or query prediction into main text and secondary text. For Place predictions, the main text contains the specific name of the Place. For query predictions, the main text contains the query. The secondary text contains additional disambiguating features (such as a city or region) to further identify the Place or refine the query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat

Returns a new instance of GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat.



641
642
643
# File 'lib/google/apis/places_v1/classes.rb', line 641

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

Instance Attribute Details

#main_textGoogle::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText

Text representing a Place or query prediction. The text may be used as is or formatted. Corresponds to the JSON property mainText



633
634
635
# File 'lib/google/apis/places_v1/classes.rb', line 633

def main_text
  @main_text
end

#secondary_textGoogle::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText

Text representing a Place or query prediction. The text may be used as is or formatted. Corresponds to the JSON property secondaryText



639
640
641
# File 'lib/google/apis/places_v1/classes.rb', line 639

def secondary_text
  @secondary_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



646
647
648
649
# File 'lib/google/apis/places_v1/classes.rb', line 646

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