google-apis-places_v1 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7e8d84f3621353fe02ef7f42eb4718feb46e9fa5622f2f8c1623d8b4a9fca5e
4
- data.tar.gz: 98eb2aec7985e8e392ad1d9dacb19f6cbf1588e164ab5fbbe8e08ef2dd12937a
3
+ metadata.gz: a288cbb711d192ba6d129fb822801122d897fd1ec9486cfdbd17cc49f8da7bcf
4
+ data.tar.gz: e7f73fbb50c65e1f18373fb9330b9734d4c966f4ec9b3ebdd807285f009b62a7
5
5
  SHA512:
6
- metadata.gz: 61ad3186f5409f7248b6e460830a65d3ecce21540d9542d3a8f5edad0634964c16de8690819e153eae3b0de471dd6b1ae43ff93fcf8405924b6eb80785a50f7f
7
- data.tar.gz: 7271eca09dbf1b0c7048da08a43a9e7e5374669d580a82bdd849f3709b28ff8a9d07ba2ab0711cfc0410c5d485aee43588c0cce411da3940221c79677ae30571
6
+ metadata.gz: 66bae08b1bae6b581f24fc7b03a8d66b870067f25131677df0737f343219a3b533b7ed3e4ffb2e1bfc939382f5395c9db77280c739c1e9659cb9dcad56ab46ec
7
+ data.tar.gz: 5e1640ee18fe4406f2af652ee9ae2f6800a643003fa9c2dd64a461f833acec66903198220f8462d9be5fba94d67cb8dcd3efdd6b8367ad0231f7e7fc2b6d4d35
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release history for google-apis-places_v1
2
2
 
3
+ ### v0.18.0 (2024-02-24)
4
+
5
+ * Regenerated from discovery document revision 20240219
6
+ * Regenerated using generator version 0.14.0
7
+
3
8
  ### v0.17.0 (2024-01-23)
4
9
 
5
10
  * Regenerated from discovery document revision 20240114
data/OVERVIEW.md CHANGED
@@ -83,9 +83,9 @@ The [product documentation](https://mapsplatform.google.com/maps-products/#place
83
83
 
84
84
  ## Supported Ruby versions
85
85
 
86
- This library is supported on Ruby 2.5+.
86
+ This library is supported on Ruby 2.7+.
87
87
 
88
- Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
88
+ Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
89
89
 
90
90
  ## License
91
91
 
@@ -99,6 +99,424 @@ module Google
99
99
  end
100
100
  end
101
101
 
102
+ # Request proto for AutocompletePlaces.
103
+ class GoogleMapsPlacesV1AutocompletePlacesRequest
104
+ include Google::Apis::Core::Hashable
105
+
106
+ # Optional. If true, the response will include both Place and query predictions.
107
+ # Otherwise the response will only return Place predictions.
108
+ # Corresponds to the JSON property `includeQueryPredictions`
109
+ # @return [Boolean]
110
+ attr_accessor :include_query_predictions
111
+ alias_method :include_query_predictions?, :include_query_predictions
112
+
113
+ # Optional. Included primary Place type (for example, "restaurant" or "
114
+ # gas_station") from https://developers.google.com/maps/documentation/places/web-
115
+ # service/place-types. A Place is only returned if its primary type is included
116
+ # in this list. Up to 5 values can be specified. If no types are specified, all
117
+ # Place types are returned.
118
+ # Corresponds to the JSON property `includedPrimaryTypes`
119
+ # @return [Array<String>]
120
+ attr_accessor :included_primary_types
121
+
122
+ # Optional. Only include results in the specified regions, specified as up to 15
123
+ # CLDR two-character region codes. An empty set will not restrict the results.
124
+ # If both `location_restriction` and `included_region_codes` are set, the
125
+ # results will be located in the area of intersection.
126
+ # Corresponds to the JSON property `includedRegionCodes`
127
+ # @return [Array<String>]
128
+ attr_accessor :included_region_codes
129
+
130
+ # Required. The text string on which to search.
131
+ # Corresponds to the JSON property `input`
132
+ # @return [String]
133
+ attr_accessor :input
134
+
135
+ # Optional. A zero-based Unicode character offset of `input` indicating the
136
+ # cursor position in `input`. The cursor position may influence what predictions
137
+ # are returned. If empty, defaults to the length of `input`.
138
+ # Corresponds to the JSON property `inputOffset`
139
+ # @return [Fixnum]
140
+ attr_accessor :input_offset
141
+
142
+ # Optional. The language in which to return results. Defaults to en-US. The
143
+ # results may be in mixed languages if the language used in `input` is different
144
+ # from `language_code` or if the returned Place does not have a translation from
145
+ # the local language to `language_code`.
146
+ # Corresponds to the JSON property `languageCode`
147
+ # @return [String]
148
+ attr_accessor :language_code
149
+
150
+ # The region to search. The results may be biased around the specified region.
151
+ # Corresponds to the JSON property `locationBias`
152
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias]
153
+ attr_accessor :location_bias
154
+
155
+ # The region to search. The results will be restricted to the specified region.
156
+ # Corresponds to the JSON property `locationRestriction`
157
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction]
158
+ attr_accessor :location_restriction
159
+
160
+ # An object that represents a latitude/longitude pair. This is expressed as a
161
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
162
+ # specified otherwise, this object must conform to the WGS84 standard. Values
163
+ # must be within normalized ranges.
164
+ # Corresponds to the JSON property `origin`
165
+ # @return [Google::Apis::PlacesV1::GoogleTypeLatLng]
166
+ attr_accessor :origin
167
+
168
+ # Optional. The region code, specified as a CLDR two-character region code. This
169
+ # affects address formatting, result ranking, and may influence what results are
170
+ # returned. This does not restrict results to the specified region. To restrict
171
+ # results to a region, use `region_code_restriction`.
172
+ # Corresponds to the JSON property `regionCode`
173
+ # @return [String]
174
+ attr_accessor :region_code
175
+
176
+ # Optional. A string which identifies an Autocomplete session for billing
177
+ # purposes. Must be a URL and filename safe base64 string with at most 36 ASCII
178
+ # characters in length. Otherwise an INVALID_ARGUMENT error is returned. The
179
+ # session begins when the user starts typing a query, and concludes when they
180
+ # select a place and a call to Place Details or Address Validation is made. Each
181
+ # session can have multiple queries, followed by one Place Details or Address
182
+ # Validation request. The credentials used for each request within a session
183
+ # must belong to the same Google Cloud Console project. Once a session has
184
+ # concluded, the token is no longer valid; your app must generate a fresh token
185
+ # for each session. If the `session_token` parameter is omitted, or if you reuse
186
+ # a session token, the session is charged as if no session token was provided (
187
+ # each request is billed separately). We recommend the following guidelines: *
188
+ # Use session tokens for all Place Autocomplete calls. * Generate a fresh token
189
+ # for each session. Using a version 4 UUID is recommended. * Ensure that the
190
+ # credentials used for all Place Autocomplete, Place Details, and Address
191
+ # Validation requests within a session belong to the same Cloud Console project.
192
+ # * Be sure to pass a unique session token for each new session. Using the same
193
+ # token for more than one session will result in each request being billed
194
+ # individually.
195
+ # Corresponds to the JSON property `sessionToken`
196
+ # @return [String]
197
+ attr_accessor :session_token
198
+
199
+ def initialize(**args)
200
+ update!(**args)
201
+ end
202
+
203
+ # Update properties of this object
204
+ def update!(**args)
205
+ @include_query_predictions = args[:include_query_predictions] if args.key?(:include_query_predictions)
206
+ @included_primary_types = args[:included_primary_types] if args.key?(:included_primary_types)
207
+ @included_region_codes = args[:included_region_codes] if args.key?(:included_region_codes)
208
+ @input = args[:input] if args.key?(:input)
209
+ @input_offset = args[:input_offset] if args.key?(:input_offset)
210
+ @language_code = args[:language_code] if args.key?(:language_code)
211
+ @location_bias = args[:location_bias] if args.key?(:location_bias)
212
+ @location_restriction = args[:location_restriction] if args.key?(:location_restriction)
213
+ @origin = args[:origin] if args.key?(:origin)
214
+ @region_code = args[:region_code] if args.key?(:region_code)
215
+ @session_token = args[:session_token] if args.key?(:session_token)
216
+ end
217
+ end
218
+
219
+ # The region to search. The results may be biased around the specified region.
220
+ class GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias
221
+ include Google::Apis::Core::Hashable
222
+
223
+ # Circle with a LatLng as center and radius.
224
+ # Corresponds to the JSON property `circle`
225
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle]
226
+ attr_accessor :circle
227
+
228
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
229
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
230
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
231
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
232
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
233
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
234
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
235
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
236
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
237
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
238
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
239
+ # populated, and the represented box cannot be empty (as specified by the
240
+ # definitions above). An empty viewport will result in an error. For example,
241
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
242
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
243
+ # 70018 ` `
244
+ # Corresponds to the JSON property `rectangle`
245
+ # @return [Google::Apis::PlacesV1::GoogleGeoTypeViewport]
246
+ attr_accessor :rectangle
247
+
248
+ def initialize(**args)
249
+ update!(**args)
250
+ end
251
+
252
+ # Update properties of this object
253
+ def update!(**args)
254
+ @circle = args[:circle] if args.key?(:circle)
255
+ @rectangle = args[:rectangle] if args.key?(:rectangle)
256
+ end
257
+ end
258
+
259
+ # The region to search. The results will be restricted to the specified region.
260
+ class GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction
261
+ include Google::Apis::Core::Hashable
262
+
263
+ # Circle with a LatLng as center and radius.
264
+ # Corresponds to the JSON property `circle`
265
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle]
266
+ attr_accessor :circle
267
+
268
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
269
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
270
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
271
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
272
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
273
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
274
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
275
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
276
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
277
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
278
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
279
+ # populated, and the represented box cannot be empty (as specified by the
280
+ # definitions above). An empty viewport will result in an error. For example,
281
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
282
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
283
+ # 70018 ` `
284
+ # Corresponds to the JSON property `rectangle`
285
+ # @return [Google::Apis::PlacesV1::GoogleGeoTypeViewport]
286
+ attr_accessor :rectangle
287
+
288
+ def initialize(**args)
289
+ update!(**args)
290
+ end
291
+
292
+ # Update properties of this object
293
+ def update!(**args)
294
+ @circle = args[:circle] if args.key?(:circle)
295
+ @rectangle = args[:rectangle] if args.key?(:rectangle)
296
+ end
297
+ end
298
+
299
+ # Response proto for AutocompletePlaces.
300
+ class GoogleMapsPlacesV1AutocompletePlacesResponse
301
+ include Google::Apis::Core::Hashable
302
+
303
+ # Contains a list of suggestions, ordered in descending order of relevance.
304
+ # Corresponds to the JSON property `suggestions`
305
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion>]
306
+ attr_accessor :suggestions
307
+
308
+ def initialize(**args)
309
+ update!(**args)
310
+ end
311
+
312
+ # Update properties of this object
313
+ def update!(**args)
314
+ @suggestions = args[:suggestions] if args.key?(:suggestions)
315
+ end
316
+ end
317
+
318
+ # An Autocomplete suggestion result.
319
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion
320
+ include Google::Apis::Core::Hashable
321
+
322
+ # Prediction results for a Place Autocomplete prediction.
323
+ # Corresponds to the JSON property `placePrediction`
324
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction]
325
+ attr_accessor :place_prediction
326
+
327
+ # Prediction results for a Query Autocomplete prediction.
328
+ # Corresponds to the JSON property `queryPrediction`
329
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction]
330
+ attr_accessor :query_prediction
331
+
332
+ def initialize(**args)
333
+ update!(**args)
334
+ end
335
+
336
+ # Update properties of this object
337
+ def update!(**args)
338
+ @place_prediction = args[:place_prediction] if args.key?(:place_prediction)
339
+ @query_prediction = args[:query_prediction] if args.key?(:query_prediction)
340
+ end
341
+ end
342
+
343
+ # Text representing a Place or query prediction. The text may be used as is or
344
+ # formatted.
345
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText
346
+ include Google::Apis::Core::Hashable
347
+
348
+ # A list of string ranges identifying where the input request matched in `text`.
349
+ # The ranges can be used to format specific parts of `text`. The substrings may
350
+ # not be exact matches of `input` if the matching was determined by criteria
351
+ # other than string matching (for example, spell corrections or transliterations)
352
+ # . These values are Unicode character offsets of `text`. The ranges are
353
+ # guaranteed to be ordered in increasing offset values.
354
+ # Corresponds to the JSON property `matches`
355
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange>]
356
+ attr_accessor :matches
357
+
358
+ # Text that may be used as is or formatted with `matches`.
359
+ # Corresponds to the JSON property `text`
360
+ # @return [String]
361
+ attr_accessor :text
362
+
363
+ def initialize(**args)
364
+ update!(**args)
365
+ end
366
+
367
+ # Update properties of this object
368
+ def update!(**args)
369
+ @matches = args[:matches] if args.key?(:matches)
370
+ @text = args[:text] if args.key?(:text)
371
+ end
372
+ end
373
+
374
+ # Prediction results for a Place Autocomplete prediction.
375
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
376
+ include Google::Apis::Core::Hashable
377
+
378
+ # The length of the geodesic in meters from `origin` if `origin` is specified.
379
+ # Certain predictions such as routes may not populate this field.
380
+ # Corresponds to the JSON property `distanceMeters`
381
+ # @return [Fixnum]
382
+ attr_accessor :distance_meters
383
+
384
+ # The resource name of the suggested Place. This name can be used in other APIs
385
+ # that accept Place names.
386
+ # Corresponds to the JSON property `place`
387
+ # @return [String]
388
+ attr_accessor :place
389
+
390
+ # The unique identifier of the suggested Place. This identifier can be used in
391
+ # other APIs that accept Place IDs.
392
+ # Corresponds to the JSON property `placeId`
393
+ # @return [String]
394
+ attr_accessor :place_id
395
+
396
+ # Contains a breakdown of a Place or query prediction into main text and
397
+ # secondary text. For Place predictions, the main text contains the specific
398
+ # name of the Place. For query predictions, the main text contains the query.
399
+ # The secondary text contains additional disambiguating features (such as a city
400
+ # or region) to further identify the Place or refine the query.
401
+ # Corresponds to the JSON property `structuredFormat`
402
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat]
403
+ attr_accessor :structured_format
404
+
405
+ # Text representing a Place or query prediction. The text may be used as is or
406
+ # formatted.
407
+ # Corresponds to the JSON property `text`
408
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText]
409
+ attr_accessor :text
410
+
411
+ # List of types that apply to this Place from Table A or Table B in https://
412
+ # developers.google.com/maps/documentation/places/web-service/place-types. A
413
+ # type is a categorization of a Place. Places with shared types will share
414
+ # similar characteristics.
415
+ # Corresponds to the JSON property `types`
416
+ # @return [Array<String>]
417
+ attr_accessor :types
418
+
419
+ def initialize(**args)
420
+ update!(**args)
421
+ end
422
+
423
+ # Update properties of this object
424
+ def update!(**args)
425
+ @distance_meters = args[:distance_meters] if args.key?(:distance_meters)
426
+ @place = args[:place] if args.key?(:place)
427
+ @place_id = args[:place_id] if args.key?(:place_id)
428
+ @structured_format = args[:structured_format] if args.key?(:structured_format)
429
+ @text = args[:text] if args.key?(:text)
430
+ @types = args[:types] if args.key?(:types)
431
+ end
432
+ end
433
+
434
+ # Prediction results for a Query Autocomplete prediction.
435
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction
436
+ include Google::Apis::Core::Hashable
437
+
438
+ # Contains a breakdown of a Place or query prediction into main text and
439
+ # secondary text. For Place predictions, the main text contains the specific
440
+ # name of the Place. For query predictions, the main text contains the query.
441
+ # The secondary text contains additional disambiguating features (such as a city
442
+ # or region) to further identify the Place or refine the query.
443
+ # Corresponds to the JSON property `structuredFormat`
444
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat]
445
+ attr_accessor :structured_format
446
+
447
+ # Text representing a Place or query prediction. The text may be used as is or
448
+ # formatted.
449
+ # Corresponds to the JSON property `text`
450
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText]
451
+ attr_accessor :text
452
+
453
+ def initialize(**args)
454
+ update!(**args)
455
+ end
456
+
457
+ # Update properties of this object
458
+ def update!(**args)
459
+ @structured_format = args[:structured_format] if args.key?(:structured_format)
460
+ @text = args[:text] if args.key?(:text)
461
+ end
462
+ end
463
+
464
+ # Identifies a substring within a given text.
465
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange
466
+ include Google::Apis::Core::Hashable
467
+
468
+ # Zero-based offset of the last Unicode character (exclusive).
469
+ # Corresponds to the JSON property `endOffset`
470
+ # @return [Fixnum]
471
+ attr_accessor :end_offset
472
+
473
+ # Zero-based offset of the first Unicode character of the string (inclusive).
474
+ # Corresponds to the JSON property `startOffset`
475
+ # @return [Fixnum]
476
+ attr_accessor :start_offset
477
+
478
+ def initialize(**args)
479
+ update!(**args)
480
+ end
481
+
482
+ # Update properties of this object
483
+ def update!(**args)
484
+ @end_offset = args[:end_offset] if args.key?(:end_offset)
485
+ @start_offset = args[:start_offset] if args.key?(:start_offset)
486
+ end
487
+ end
488
+
489
+ # Contains a breakdown of a Place or query prediction into main text and
490
+ # secondary text. For Place predictions, the main text contains the specific
491
+ # name of the Place. For query predictions, the main text contains the query.
492
+ # The secondary text contains additional disambiguating features (such as a city
493
+ # or region) to further identify the Place or refine the query.
494
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat
495
+ include Google::Apis::Core::Hashable
496
+
497
+ # Text representing a Place or query prediction. The text may be used as is or
498
+ # formatted.
499
+ # Corresponds to the JSON property `mainText`
500
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText]
501
+ attr_accessor :main_text
502
+
503
+ # Text representing a Place or query prediction. The text may be used as is or
504
+ # formatted.
505
+ # Corresponds to the JSON property `secondaryText`
506
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText]
507
+ attr_accessor :secondary_text
508
+
509
+ def initialize(**args)
510
+ update!(**args)
511
+ end
512
+
513
+ # Update properties of this object
514
+ def update!(**args)
515
+ @main_text = args[:main_text] if args.key?(:main_text)
516
+ @secondary_text = args[:secondary_text] if args.key?(:secondary_text)
517
+ end
518
+ end
519
+
102
520
  # Circle with a LatLng as center and radius.
103
521
  class GoogleMapsPlacesV1Circle
104
522
  include Google::Apis::Core::Hashable
@@ -529,7 +947,8 @@ module Google
529
947
  # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1PlacePaymentOptions]
530
948
  attr_accessor :payment_options
531
949
 
532
- # Information (including references) about photos of this place.
950
+ # Information (including references) about photos of this place. A maximum of 10
951
+ # photos can be returned.
533
952
  # Corresponds to the JSON property `photos`
534
953
  # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1Photo>]
535
954
  attr_accessor :photos
@@ -592,7 +1011,8 @@ module Google
592
1011
  attr_accessor :restroom
593
1012
  alias_method :restroom?, :restroom
594
1013
 
595
- # List of reviews about this place, sorted by relevance.
1014
+ # List of reviews about this place, sorted by relevance. A maximum of 5 reviews
1015
+ # can be returned.
596
1016
  # Corresponds to the JSON property `reviews`
597
1017
  # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1Review>]
598
1018
  attr_accessor :reviews
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module PlacesV1
18
18
  # Version of the google-apis-places_v1 gem
19
- GEM_VERSION = "0.17.0"
19
+ GEM_VERSION = "0.18.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.13.0"
22
+ GENERATOR_VERSION = "0.14.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240114"
25
+ REVISION = "20240219"
26
26
  end
27
27
  end
28
28
  end
@@ -34,6 +34,66 @@ module Google
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
+ class GoogleMapsPlacesV1AutocompletePlacesRequest
38
+ class Representation < Google::Apis::Core::JsonRepresentation; end
39
+
40
+ include Google::Apis::Core::JsonObjectSupport
41
+ end
42
+
43
+ class GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias
44
+ class Representation < Google::Apis::Core::JsonRepresentation; end
45
+
46
+ include Google::Apis::Core::JsonObjectSupport
47
+ end
48
+
49
+ class GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
55
+ class GoogleMapsPlacesV1AutocompletePlacesResponse
56
+ class Representation < Google::Apis::Core::JsonRepresentation; end
57
+
58
+ include Google::Apis::Core::JsonObjectSupport
59
+ end
60
+
61
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion
62
+ class Representation < Google::Apis::Core::JsonRepresentation; end
63
+
64
+ include Google::Apis::Core::JsonObjectSupport
65
+ end
66
+
67
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText
68
+ class Representation < Google::Apis::Core::JsonRepresentation; end
69
+
70
+ include Google::Apis::Core::JsonObjectSupport
71
+ end
72
+
73
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
79
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
85
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
37
97
  class GoogleMapsPlacesV1Circle
38
98
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
99
 
@@ -239,6 +299,115 @@ module Google
239
299
  end
240
300
  end
241
301
 
302
+ class GoogleMapsPlacesV1AutocompletePlacesRequest
303
+ # @private
304
+ class Representation < Google::Apis::Core::JsonRepresentation
305
+ property :include_query_predictions, as: 'includeQueryPredictions'
306
+ collection :included_primary_types, as: 'includedPrimaryTypes'
307
+ collection :included_region_codes, as: 'includedRegionCodes'
308
+ property :input, as: 'input'
309
+ property :input_offset, as: 'inputOffset'
310
+ property :language_code, as: 'languageCode'
311
+ property :location_bias, as: 'locationBias', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias::Representation
312
+
313
+ property :location_restriction, as: 'locationRestriction', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction::Representation
314
+
315
+ property :origin, as: 'origin', class: Google::Apis::PlacesV1::GoogleTypeLatLng, decorator: Google::Apis::PlacesV1::GoogleTypeLatLng::Representation
316
+
317
+ property :region_code, as: 'regionCode'
318
+ property :session_token, as: 'sessionToken'
319
+ end
320
+ end
321
+
322
+ class GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias
323
+ # @private
324
+ class Representation < Google::Apis::Core::JsonRepresentation
325
+ property :circle, as: 'circle', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle::Representation
326
+
327
+ property :rectangle, as: 'rectangle', class: Google::Apis::PlacesV1::GoogleGeoTypeViewport, decorator: Google::Apis::PlacesV1::GoogleGeoTypeViewport::Representation
328
+
329
+ end
330
+ end
331
+
332
+ class GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction
333
+ # @private
334
+ class Representation < Google::Apis::Core::JsonRepresentation
335
+ property :circle, as: 'circle', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle::Representation
336
+
337
+ property :rectangle, as: 'rectangle', class: Google::Apis::PlacesV1::GoogleGeoTypeViewport, decorator: Google::Apis::PlacesV1::GoogleGeoTypeViewport::Representation
338
+
339
+ end
340
+ end
341
+
342
+ class GoogleMapsPlacesV1AutocompletePlacesResponse
343
+ # @private
344
+ class Representation < Google::Apis::Core::JsonRepresentation
345
+ collection :suggestions, as: 'suggestions', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion::Representation
346
+
347
+ end
348
+ end
349
+
350
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion
351
+ # @private
352
+ class Representation < Google::Apis::Core::JsonRepresentation
353
+ property :place_prediction, as: 'placePrediction', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction::Representation
354
+
355
+ property :query_prediction, as: 'queryPrediction', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction::Representation
356
+
357
+ end
358
+ end
359
+
360
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText
361
+ # @private
362
+ class Representation < Google::Apis::Core::JsonRepresentation
363
+ collection :matches, as: 'matches', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange::Representation
364
+
365
+ property :text, as: 'text'
366
+ end
367
+ end
368
+
369
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction
370
+ # @private
371
+ class Representation < Google::Apis::Core::JsonRepresentation
372
+ property :distance_meters, as: 'distanceMeters'
373
+ property :place, as: 'place'
374
+ property :place_id, as: 'placeId'
375
+ property :structured_format, as: 'structuredFormat', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat::Representation
376
+
377
+ property :text, as: 'text', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText::Representation
378
+
379
+ collection :types, as: 'types'
380
+ end
381
+ end
382
+
383
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction
384
+ # @private
385
+ class Representation < Google::Apis::Core::JsonRepresentation
386
+ property :structured_format, as: 'structuredFormat', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat::Representation
387
+
388
+ property :text, as: 'text', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText::Representation
389
+
390
+ end
391
+ end
392
+
393
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange
394
+ # @private
395
+ class Representation < Google::Apis::Core::JsonRepresentation
396
+ property :end_offset, as: 'endOffset'
397
+ property :start_offset, as: 'startOffset'
398
+ end
399
+ end
400
+
401
+ class GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat
402
+ # @private
403
+ class Representation < Google::Apis::Core::JsonRepresentation
404
+ property :main_text, as: 'mainText', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText::Representation
405
+
406
+ property :secondary_text, as: 'secondaryText', class: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText, decorator: Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText::Representation
407
+
408
+ end
409
+ end
410
+
242
411
  class GoogleMapsPlacesV1Circle
243
412
  # @private
244
413
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -51,6 +51,36 @@ module Google
51
51
  @batch_path = 'batch'
52
52
  end
53
53
 
54
+ # Returns predictions for the given input.
55
+ # @param [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequest] google_maps_places_v1_autocomplete_places_request_object
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponse] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponse]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def autocomplete_place(google_maps_places_v1_autocomplete_places_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:post, 'v1/places:autocomplete', options)
75
+ command.request_representation = Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesRequest::Representation
76
+ command.request_object = google_maps_places_v1_autocomplete_places_request_object
77
+ command.response_representation = Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponse::Representation
78
+ command.response_class = Google::Apis::PlacesV1::GoogleMapsPlacesV1AutocompletePlacesResponse
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
54
84
  # Get the details of a place based on its resource name, which is a string in
55
85
  # the `places/`place_id`` format.
56
86
  # @param [String] name
@@ -66,6 +96,26 @@ module Google
66
96
  # results based on applicable law. For more information, see https://www.unicode.
67
97
  # org/cldr/charts/latest/supplemental/territory_language_information.html. Note
68
98
  # that 3-digit region codes are not currently supported.
99
+ # @param [String] session_token
100
+ # Optional. A string which identifies an Autocomplete session for billing
101
+ # purposes. Must be a URL and filename safe base64 string with at most 36 ASCII
102
+ # characters in length. Otherwise an INVALID_ARGUMENT error is returned. The
103
+ # session begins when the user starts typing a query, and concludes when they
104
+ # select a place and a call to Place Details or Address Validation is made. Each
105
+ # session can have multiple queries, followed by one Place Details or Address
106
+ # Validation request. The credentials used for each request within a session
107
+ # must belong to the same Google Cloud Console project. Once a session has
108
+ # concluded, the token is no longer valid; your app must generate a fresh token
109
+ # for each session. If the `session_token` parameter is omitted, or if you reuse
110
+ # a session token, the session is charged as if no session token was provided (
111
+ # each request is billed separately). We recommend the following guidelines: *
112
+ # Use session tokens for all Place Autocomplete calls. * Generate a fresh token
113
+ # for each session. Using a version 4 UUID is recommended. * Ensure that the
114
+ # credentials used for all Place Autocomplete, Place Details, and Address
115
+ # Validation requests within a session belong to the same Cloud Console project.
116
+ # * Be sure to pass a unique session token for each new session. Using the same
117
+ # token for more than one session will result in each request being billed
118
+ # individually.
69
119
  # @param [String] fields
70
120
  # Selector specifying which fields to include in a partial response.
71
121
  # @param [String] quota_user
@@ -83,13 +133,14 @@ module Google
83
133
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
84
134
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
85
135
  # @raise [Google::Apis::AuthorizationError] Authorization is required
86
- def get_place(name, language_code: nil, region_code: nil, fields: nil, quota_user: nil, options: nil, &block)
136
+ def get_place(name, language_code: nil, region_code: nil, session_token: nil, fields: nil, quota_user: nil, options: nil, &block)
87
137
  command = make_simple_command(:get, 'v1/{+name}', options)
88
138
  command.response_representation = Google::Apis::PlacesV1::GoogleMapsPlacesV1Place::Representation
89
139
  command.response_class = Google::Apis::PlacesV1::GoogleMapsPlacesV1Place
90
140
  command.params['name'] = name unless name.nil?
91
141
  command.query['languageCode'] = language_code unless language_code.nil?
92
142
  command.query['regionCode'] = region_code unless region_code.nil?
143
+ command.query['sessionToken'] = session_token unless session_token.nil?
93
144
  command.query['fields'] = fields unless fields.nil?
94
145
  command.query['quotaUser'] = quota_user unless quota_user.nil?
95
146
  execute_or_queue_command(command, &block)
@@ -35,6 +35,9 @@ module Google
35
35
  # Private Service: https://www.googleapis.com/auth/maps-platform.places
36
36
  AUTH_MAPS_PLATFORM_PLACES = 'https://www.googleapis.com/auth/maps-platform.places'
37
37
 
38
+ # Private Service: https://www.googleapis.com/auth/maps-platform.places.autocomplete
39
+ AUTH_MAPS_PLATFORM_PLACES_AUTOCOMPLETE = 'https://www.googleapis.com/auth/maps-platform.places.autocomplete'
40
+
38
41
  # Private Service: https://www.googleapis.com/auth/maps-platform.places.details
39
42
  AUTH_MAPS_PLATFORM_PLACES_DETAILS = 'https://www.googleapis.com/auth/maps-platform.places.details'
40
43
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-places_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-23 00:00:00.000000000 Z
11
+ date: 2024-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.12.0
19
+ version: 0.14.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.12.0
29
+ version: 0.14.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-places_v1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-places_v1/v0.17.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-places_v1/v0.18.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-places_v1
63
63
  post_install_message:
64
64
  rdoc_options: []
@@ -68,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '2.5'
71
+ version: '2.7'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.5.3
78
+ rubygems_version: 3.5.6
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Simple REST client for Places API (New) V1