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
origin
iforigin
is 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.
420 421 422 |
# File 'lib/google/apis/places_v1/classes.rb', line 420 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
383 384 385 |
# File 'lib/google/apis/places_v1/classes.rb', line 383 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
389 390 391 |
# File 'lib/google/apis/places_v1/classes.rb', line 389 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
395 396 397 |
# File 'lib/google/apis/places_v1/classes.rb', line 395 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
404 405 406 |
# File 'lib/google/apis/places_v1/classes.rb', line 404 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
410 411 412 |
# File 'lib/google/apis/places_v1/classes.rb', line 410 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
418 419 420 |
# File 'lib/google/apis/places_v1/classes.rb', line 418 def types @types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
425 426 427 428 429 430 431 432 |
# File 'lib/google/apis/places_v1/classes.rb', line 425 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 |