Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequest
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequest
- 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
Request proto for AutocompletePlaces.
Instance Attribute Summary collapse
-
#include_future_opening_businesses ⇒ Boolean
(also: #include_future_opening_businesses?)
Optional.
-
#include_pure_service_area_businesses ⇒ Boolean
(also: #include_pure_service_area_businesses?)
Optional.
-
#include_query_predictions ⇒ Boolean
(also: #include_query_predictions?)
Optional.
-
#included_primary_types ⇒ Array<String>
Optional.
-
#included_region_codes ⇒ Array<String>
Optional.
-
#input ⇒ String
Required.
-
#input_offset ⇒ Fixnum
Optional.
-
#language_code ⇒ String
Optional.
-
#location_bias ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias
The region to search.
-
#location_restriction ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction
The region to search.
-
#origin ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair.
-
#region_code ⇒ String
Optional.
-
#session_token ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesRequest
constructor
A new instance of GoogleMapsPlacesV1AutocompletePlacesRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1AutocompletePlacesRequest
Returns a new instance of GoogleMapsPlacesV1AutocompletePlacesRequest.
350 351 352 |
# File 'lib/google/apis/places_v1/classes.rb', line 350 def initialize(**args) update!(**args) end |
Instance Attribute Details
#include_future_opening_businesses ⇒ Boolean Also known as: include_future_opening_businesses?
Optional. If true, include businesses that are not yet open but will open in
the future.
Corresponds to the JSON property includeFutureOpeningBusinesses
241 242 243 |
# File 'lib/google/apis/places_v1/classes.rb', line 241 def include_future_opening_businesses @include_future_opening_businesses end |
#include_pure_service_area_businesses ⇒ Boolean Also known as: include_pure_service_area_businesses?
Optional. Include pure service area businesses if the field is set to true.
Pure service area business is a business that visits or delivers to customers
directly but does not serve customers at their business address. For example,
businesses like cleaning services or plumbers. Those businesses do not have a
physical address or location on Google Maps. Places will not return fields
including location, plus_code, and other location related fields for these
businesses.
Corresponds to the JSON property includePureServiceAreaBusinesses
253 254 255 |
# File 'lib/google/apis/places_v1/classes.rb', line 253 def include_pure_service_area_businesses @include_pure_service_area_businesses end |
#include_query_predictions ⇒ Boolean Also known as: include_query_predictions?
Optional. If true, the response will include both Place and query predictions.
Otherwise the response will only return Place predictions.
Corresponds to the JSON property includeQueryPredictions
260 261 262 |
# File 'lib/google/apis/places_v1/classes.rb', line 260 def include_query_predictions @include_query_predictions end |
#included_primary_types ⇒ Array<String>
Optional. Included primary Place type (for example, "restaurant" or "
gas_station") in Place Types (https://developers.google.com/maps/documentation/
places/web-service/place-types), or only (regions), or only (cities). A
Place is only returned if its primary type is included in this list. Up to 5
values can be specified. If no types are specified, all Place types are
returned.
Corresponds to the JSON property includedPrimaryTypes
271 272 273 |
# File 'lib/google/apis/places_v1/classes.rb', line 271 def included_primary_types @included_primary_types end |
#included_region_codes ⇒ Array<String>
Optional. Only include results in the specified regions, specified as up to 15
CLDR two-character region codes. An empty set will not restrict the results.
If both location_restriction and included_region_codes are set, the
results will be located in the area of intersection.
Corresponds to the JSON property includedRegionCodes
279 280 281 |
# File 'lib/google/apis/places_v1/classes.rb', line 279 def included_region_codes @included_region_codes end |
#input ⇒ String
Required. The text string on which to search.
Corresponds to the JSON property input
284 285 286 |
# File 'lib/google/apis/places_v1/classes.rb', line 284 def input @input end |
#input_offset ⇒ Fixnum
Optional. A zero-based Unicode character offset of input indicating the
cursor position in input. The cursor position may influence what predictions
are returned. If empty, defaults to the length of input.
Corresponds to the JSON property inputOffset
291 292 293 |
# File 'lib/google/apis/places_v1/classes.rb', line 291 def input_offset @input_offset end |
#language_code ⇒ String
Optional. The language in which to return results. Defaults to en-US. The
results may be in mixed languages if the language used in input is different
from language_code or if the returned Place does not have a translation from
the local language to language_code.
Corresponds to the JSON property languageCode
299 300 301 |
# File 'lib/google/apis/places_v1/classes.rb', line 299 def language_code @language_code end |
#location_bias ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias
The region to search. The results may be biased around the specified region.
Corresponds to the JSON property locationBias
304 305 306 |
# File 'lib/google/apis/places_v1/classes.rb', line 304 def location_bias @location_bias end |
#location_restriction ⇒ Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction
The region to search. The results will be restricted to the specified region.
Corresponds to the JSON property locationRestriction
309 310 311 |
# File 'lib/google/apis/places_v1/classes.rb', line 309 def location_restriction @location_restriction end |
#origin ⇒ Google::Apis::PlacesV1::GoogleTypeLatLng
An object that represents a latitude/longitude pair. This is expressed as a
pair of doubles to represent degrees latitude and degrees longitude. Unless
specified otherwise, this object must conform to the WGS84 standard. Values
must be within normalized ranges.
Corresponds to the JSON property origin
317 318 319 |
# File 'lib/google/apis/places_v1/classes.rb', line 317 def origin @origin end |
#region_code ⇒ String
Optional. The region code, specified as a CLDR two-character region code. This
affects address formatting, result ranking, and may influence what results are
returned. This does not restrict results to the specified region. To restrict
results to a region, use region_code_restriction.
Corresponds to the JSON property regionCode
325 326 327 |
# File 'lib/google/apis/places_v1/classes.rb', line 325 def region_code @region_code end |
#session_token ⇒ String
Optional. A string which identifies an Autocomplete session for billing
purposes. Must be a URL and filename safe base64 string with at most 36 ASCII
characters in length. Otherwise an INVALID_ARGUMENT error is returned. The
session begins when the user starts typing a query, and concludes when they
select a place and a call to Place Details or Address Validation is made. Each
session can have multiple queries, followed by one Place Details or Address
Validation request. The credentials used for each request within a session
must belong to the same Google Cloud Console project. Once a session has
concluded, the token is no longer valid; your app must generate a fresh token
for each session. If the session_token parameter is omitted, or if you reuse
a session token, the session is charged as if no session token was provided (
each request is billed separately). We recommend the following guidelines: *
Use session tokens for all Place Autocomplete calls. * Generate a fresh token
for each session. Using a version 4 UUID is recommended. * Ensure that the
credentials used for all Place Autocomplete, Place Details, and Address
Validation requests within a session belong to the same Cloud Console project.
- Be sure to pass a unique session token for each new session. Using the same
token for more than one session will result in each request being billed
individually.
Corresponds to the JSON property
sessionToken
348 349 350 |
# File 'lib/google/apis/places_v1/classes.rb', line 348 def session_token @session_token end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/google/apis/places_v1/classes.rb', line 355 def update!(**args) @include_future_opening_businesses = args[:include_future_opening_businesses] if args.key?(:include_future_opening_businesses) @include_pure_service_area_businesses = args[:include_pure_service_area_businesses] if args.key?(:include_pure_service_area_businesses) @include_query_predictions = args[:include_query_predictions] if args.key?(:include_query_predictions) @included_primary_types = args[:included_primary_types] if args.key?(:included_primary_types) @included_region_codes = args[:included_region_codes] if args.key?(:included_region_codes) @input = args[:input] if args.key?(:input) @input_offset = args[:input_offset] if args.key?(:input_offset) @language_code = args[:language_code] if args.key?(:language_code) @location_bias = args[:location_bias] if args.key?(:location_bias) @location_restriction = args[:location_restriction] if args.key?(:location_restriction) @origin = args[:origin] if args.key?(:origin) @region_code = args[:region_code] if args.key?(:region_code) @session_token = args[:session_token] if args.key?(:session_token) end |