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.



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

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



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

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



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

def secondary_text
  @secondary_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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