Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
- 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
Prediction results for a Place Autocomplete prediction.
Instance Attribute Summary collapse
-
#distance_meters ⇒ Fixnum
The length of the geodesic in meters from
originiforiginis specified. -
#place ⇒ String
The resource name of the suggested Place.
-
#place_id ⇒ String
The unique identifier of the suggested Place.
-
#structured_format ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat
Contains a breakdown of a Place or query prediction into main text and secondary text.
-
#text ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText
Text representing a Place or query prediction.
-
#types ⇒ Array<String>
List of types that apply to this Place from Table A or Table B in https:// developers.google.com/maps/documentation/places/web-service/place-types.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
constructor
A new instance of GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
Returns a new instance of GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction.
551 552 553 |
# File 'lib/google/apis/places_v1/classes.rb', line 551 def initialize(**args) update!(**args) end |
Instance Attribute Details
#distance_meters ⇒ Fixnum
The length of the geodesic in meters from origin if origin is specified.
Certain predictions such as routes may not populate this field.
Corresponds to the JSON property distanceMeters
514 515 516 |
# File 'lib/google/apis/places_v1/classes.rb', line 514 def distance_meters @distance_meters end |
#place ⇒ String
The resource name of the suggested Place. This name can be used in other APIs
that accept Place names.
Corresponds to the JSON property place
520 521 522 |
# File 'lib/google/apis/places_v1/classes.rb', line 520 def place @place end |
#place_id ⇒ String
The unique identifier of the suggested Place. This identifier can be used in
other APIs that accept Place IDs.
Corresponds to the JSON property placeId
526 527 528 |
# File 'lib/google/apis/places_v1/classes.rb', line 526 def place_id @place_id end |
#structured_format ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat
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.
Corresponds to the JSON property structuredFormat
535 536 537 |
# File 'lib/google/apis/places_v1/classes.rb', line 535 def structured_format @structured_format end |
#text ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText
Text representing a Place or query prediction. The text may be used as is or
formatted.
Corresponds to the JSON property text
541 542 543 |
# File 'lib/google/apis/places_v1/classes.rb', line 541 def text @text end |
#types ⇒ Array<String>
List of types that apply to this Place from Table A or Table B in https://
developers.google.com/maps/documentation/places/web-service/place-types. A
type is a categorization of a Place. Places with shared types will share
similar characteristics.
Corresponds to the JSON property types
549 550 551 |
# File 'lib/google/apis/places_v1/classes.rb', line 549 def types @types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
556 557 558 559 560 561 562 563 |
# File 'lib/google/apis/places_v1/classes.rb', line 556 def update!(**args) @distance_meters = args[:distance_meters] if args.key?(:distance_meters) @place = args[:place] if args.key?(:place) @place_id = args[:place_id] if args.key?(:place_id) @structured_format = args[:structured_format] if args.key?(:structured_format) @text = args[:text] if args.key?(:text) @types = args[:types] if args.key?(:types) end |