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.



654
655
656
# File 'lib/google/apis/places_v1/classes.rb', line 654

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



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

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



652
653
654
# File 'lib/google/apis/places_v1/classes.rb', line 652

def secondary_text
  @secondary_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



659
660
661
662
# File 'lib/google/apis/places_v1/classes.rb', line 659

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