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.
572 573 574 |
# File 'lib/google/apis/places_v1/classes.rb', line 572 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
535 536 537 |
# File 'lib/google/apis/places_v1/classes.rb', line 535 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
541 542 543 |
# File 'lib/google/apis/places_v1/classes.rb', line 541 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
547 548 549 |
# File 'lib/google/apis/places_v1/classes.rb', line 547 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
556 557 558 |
# File 'lib/google/apis/places_v1/classes.rb', line 556 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
562 563 564 |
# File 'lib/google/apis/places_v1/classes.rb', line 562 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
570 571 572 |
# File 'lib/google/apis/places_v1/classes.rb', line 570 def types @types end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
577 578 579 580 581 582 583 584 |
# File 'lib/google/apis/places_v1/classes.rb', line 577 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 |