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.



510
511
512
# File 'lib/google/apis/places_v1/classes.rb', line 510

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



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

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



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

def secondary_text
  @secondary_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



515
516
517
518
# File 'lib/google/apis/places_v1/classes.rb', line 515

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