google-apis-places_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1169 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module PlacesV1
24
+
25
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
26
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
27
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
28
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
29
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
30
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
31
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
32
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
33
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
34
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
35
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
36
+ # populated, and the represented box cannot be empty (as specified by the
37
+ # definitions above). An empty viewport will result in an error. For example,
38
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
39
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
40
+ # 70018 ` `
41
+ class GoogleGeoTypeViewport
42
+ include Google::Apis::Core::Hashable
43
+
44
+ # An object that represents a latitude/longitude pair. This is expressed as a
45
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
46
+ # specified otherwise, this object must conform to the WGS84 standard. Values
47
+ # must be within normalized ranges.
48
+ # Corresponds to the JSON property `high`
49
+ # @return [Google::Apis::PlacesV1::GoogleTypeLatLng]
50
+ attr_accessor :high
51
+
52
+ # An object that represents a latitude/longitude pair. This is expressed as a
53
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
54
+ # specified otherwise, this object must conform to the WGS84 standard. Values
55
+ # must be within normalized ranges.
56
+ # Corresponds to the JSON property `low`
57
+ # @return [Google::Apis::PlacesV1::GoogleTypeLatLng]
58
+ attr_accessor :low
59
+
60
+ def initialize(**args)
61
+ update!(**args)
62
+ end
63
+
64
+ # Update properties of this object
65
+ def update!(**args)
66
+ @high = args[:high] if args.key?(:high)
67
+ @low = args[:low] if args.key?(:low)
68
+ end
69
+ end
70
+
71
+ # Information about the author of the UGC data. Used in Photo, and Review.
72
+ class GoogleMapsPlacesV1AuthorAttribution
73
+ include Google::Apis::Core::Hashable
74
+
75
+ # Output only. Name of the author of the Photo or Review.
76
+ # Corresponds to the JSON property `displayName`
77
+ # @return [String]
78
+ attr_accessor :display_name
79
+
80
+ # Output only. Profile photo URI of the author of the Photo or Review.
81
+ # Corresponds to the JSON property `photoUri`
82
+ # @return [String]
83
+ attr_accessor :photo_uri
84
+
85
+ # Output only. URI of the author of the Photo or Review.
86
+ # Corresponds to the JSON property `uri`
87
+ # @return [String]
88
+ attr_accessor :uri
89
+
90
+ def initialize(**args)
91
+ update!(**args)
92
+ end
93
+
94
+ # Update properties of this object
95
+ def update!(**args)
96
+ @display_name = args[:display_name] if args.key?(:display_name)
97
+ @photo_uri = args[:photo_uri] if args.key?(:photo_uri)
98
+ @uri = args[:uri] if args.key?(:uri)
99
+ end
100
+ end
101
+
102
+ # Circle with a LatLng as center and radius.
103
+ class GoogleMapsPlacesV1Circle
104
+ include Google::Apis::Core::Hashable
105
+
106
+ # An object that represents a latitude/longitude pair. This is expressed as a
107
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
108
+ # specified otherwise, this object must conform to the WGS84 standard. Values
109
+ # must be within normalized ranges.
110
+ # Corresponds to the JSON property `center`
111
+ # @return [Google::Apis::PlacesV1::GoogleTypeLatLng]
112
+ attr_accessor :center
113
+
114
+ # Required. Radius measured in meters. The radius must be within [0.0, 50000.0].
115
+ # Corresponds to the JSON property `radius`
116
+ # @return [Float]
117
+ attr_accessor :radius
118
+
119
+ def initialize(**args)
120
+ update!(**args)
121
+ end
122
+
123
+ # Update properties of this object
124
+ def update!(**args)
125
+ @center = args[:center] if args.key?(:center)
126
+ @radius = args[:radius] if args.key?(:radius)
127
+ end
128
+ end
129
+
130
+ # int 32 range. Both min and max are optional. If only min is set, then the
131
+ # range only has a lower bound. If only max is set, then range only has an upper
132
+ # bound. At least one of min and max must be set. Values are inclusive.
133
+ class GoogleMapsPlacesV1Int32Range
134
+ include Google::Apis::Core::Hashable
135
+
136
+ # Upper bound. If unset, behavior is documented on the range field.
137
+ # Corresponds to the JSON property `max`
138
+ # @return [Fixnum]
139
+ attr_accessor :max
140
+
141
+ # Lower bound. If unset, behavior is documented on the range field.
142
+ # Corresponds to the JSON property `min`
143
+ # @return [Fixnum]
144
+ attr_accessor :min
145
+
146
+ def initialize(**args)
147
+ update!(**args)
148
+ end
149
+
150
+ # Update properties of this object
151
+ def update!(**args)
152
+ @max = args[:max] if args.key?(:max)
153
+ @min = args[:min] if args.key?(:min)
154
+ end
155
+ end
156
+
157
+ # All the information representing a Place.
158
+ class GoogleMapsPlacesV1Place
159
+ include Google::Apis::Core::Hashable
160
+
161
+ # Output only. Repeated components for each locality level.
162
+ # Corresponds to the JSON property `addressComponents`
163
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceAddressComponent>]
164
+ attr_accessor :address_components
165
+
166
+ # Output only. The place's address in adr microformat: http://microformats.org/
167
+ # wiki/adr.
168
+ # Corresponds to the JSON property `adrFormatAddress`
169
+ # @return [String]
170
+ attr_accessor :adr_format_address
171
+
172
+ # Output only. A set of data provider that must be shown with this result.
173
+ # Corresponds to the JSON property `attributions`
174
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceAttribution>]
175
+ attr_accessor :attributions
176
+
177
+ # Output only. The business status for the place.
178
+ # Corresponds to the JSON property `businessStatus`
179
+ # @return [String]
180
+ attr_accessor :business_status
181
+
182
+ # Output only. Specifies if the business supports curbside pickup.
183
+ # Corresponds to the JSON property `curbsidePickup`
184
+ # @return [Boolean]
185
+ attr_accessor :curbside_pickup
186
+ alias_method :curbside_pickup?, :curbside_pickup
187
+
188
+ # Information about business hour of the place.
189
+ # Corresponds to the JSON property `currentOpeningHours`
190
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours]
191
+ attr_accessor :current_opening_hours
192
+
193
+ # Output only. Contains an array of entries for the next seven days including
194
+ # information about secondary hours of a business. Secondary hours are different
195
+ # from a business's main hours. For example, a restaurant can specify drive
196
+ # through hours or delivery hours as its secondary hours. This field populates
197
+ # the type subfield, which draws from a predefined list of opening hours types (
198
+ # such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.
199
+ # This field includes the special_days subfield of all hours, set for dates that
200
+ # have exceptional hours.
201
+ # Corresponds to the JSON property `currentSecondaryOpeningHours`
202
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours>]
203
+ attr_accessor :current_secondary_opening_hours
204
+
205
+ # Output only. Specifies if the business supports delivery.
206
+ # Corresponds to the JSON property `delivery`
207
+ # @return [Boolean]
208
+ attr_accessor :delivery
209
+ alias_method :delivery?, :delivery
210
+
211
+ # Output only. Specifies if the business supports indoor or outdoor seating
212
+ # options.
213
+ # Corresponds to the JSON property `dineIn`
214
+ # @return [Boolean]
215
+ attr_accessor :dine_in
216
+ alias_method :dine_in?, :dine_in
217
+
218
+ # Localized variant of a text in a particular language.
219
+ # Corresponds to the JSON property `displayName`
220
+ # @return [Google::Apis::PlacesV1::GoogleTypeLocalizedText]
221
+ attr_accessor :display_name
222
+
223
+ # Localized variant of a text in a particular language.
224
+ # Corresponds to the JSON property `editorialSummary`
225
+ # @return [Google::Apis::PlacesV1::GoogleTypeLocalizedText]
226
+ attr_accessor :editorial_summary
227
+
228
+ # Output only. A full, human-readable address for this place.
229
+ # Corresponds to the JSON property `formattedAddress`
230
+ # @return [String]
231
+ attr_accessor :formatted_address
232
+
233
+ # Output only. A URL providing more information about this place.
234
+ # Corresponds to the JSON property `googleMapsUri`
235
+ # @return [String]
236
+ attr_accessor :google_maps_uri
237
+
238
+ # Output only. Background color for icon_mask in hex format, e.g. #909CE1.
239
+ # Corresponds to the JSON property `iconBackgroundColor`
240
+ # @return [String]
241
+ attr_accessor :icon_background_color
242
+
243
+ # Output only. A truncated URL to an v2 icon mask. User can access different
244
+ # icon type by appending type suffix to the end (eg, ".svg" or ".png").
245
+ # Corresponds to the JSON property `iconMaskBaseUri`
246
+ # @return [String]
247
+ attr_accessor :icon_mask_base_uri
248
+
249
+ # Output only. The unique identifier of a place.
250
+ # Corresponds to the JSON property `id`
251
+ # @return [String]
252
+ attr_accessor :id
253
+
254
+ # Output only. A human-readable phone number for the place, in international
255
+ # format.
256
+ # Corresponds to the JSON property `internationalPhoneNumber`
257
+ # @return [String]
258
+ attr_accessor :international_phone_number
259
+
260
+ # An object that represents a latitude/longitude pair. This is expressed as a
261
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
262
+ # specified otherwise, this object must conform to the WGS84 standard. Values
263
+ # must be within normalized ranges.
264
+ # Corresponds to the JSON property `location`
265
+ # @return [Google::Apis::PlacesV1::GoogleTypeLatLng]
266
+ attr_accessor :location
267
+
268
+ # Output only. An ID representing this place which may be used to look up this
269
+ # place again (a.k.a. the API "resource" name: places/).
270
+ # Corresponds to the JSON property `name`
271
+ # @return [String]
272
+ attr_accessor :name
273
+
274
+ # Output only. A human-readable phone number for the place, in national format.
275
+ # Corresponds to the JSON property `nationalPhoneNumber`
276
+ # @return [String]
277
+ attr_accessor :national_phone_number
278
+
279
+ # Information about business hour of the place.
280
+ # Corresponds to the JSON property `openingHours`
281
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours]
282
+ attr_accessor :opening_hours
283
+
284
+ # Plus code (http://plus.codes) is a location reference with two formats: global
285
+ # code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and
286
+ # compound code, replacing the prefix with a reference location.
287
+ # Corresponds to the JSON property `plusCode`
288
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1PlacePlusCode]
289
+ attr_accessor :plus_code
290
+
291
+ # Output only. Price level of the place.
292
+ # Corresponds to the JSON property `priceLevel`
293
+ # @return [String]
294
+ attr_accessor :price_level
295
+
296
+ # Output only. A rating between 1.0 and 5.0, based on user reviews of this place.
297
+ # Corresponds to the JSON property `rating`
298
+ # @return [Float]
299
+ attr_accessor :rating
300
+
301
+ # Output only. Specifies if the place supports reservations.
302
+ # Corresponds to the JSON property `reservable`
303
+ # @return [Boolean]
304
+ attr_accessor :reservable
305
+ alias_method :reservable?, :reservable
306
+
307
+ # Output only. List of reviews about this place.
308
+ # Corresponds to the JSON property `reviews`
309
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceReview>]
310
+ attr_accessor :reviews
311
+
312
+ # Output only. Contains an array of entries for information about regular
313
+ # secondary hours of a business. Secondary hours are different from a business's
314
+ # main hours. For example, a restaurant can specify drive through hours or
315
+ # delivery hours as its secondary hours. This field populates the type subfield,
316
+ # which draws from a predefined list of opening hours types (such as
317
+ # DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.
318
+ # Corresponds to the JSON property `secondaryOpeningHours`
319
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHours>]
320
+ attr_accessor :secondary_opening_hours
321
+
322
+ # Output only. Specifies if the place serves beer.
323
+ # Corresponds to the JSON property `servesBeer`
324
+ # @return [Boolean]
325
+ attr_accessor :serves_beer
326
+ alias_method :serves_beer?, :serves_beer
327
+
328
+ # Output only. Specifies if the place serves breakfast.
329
+ # Corresponds to the JSON property `servesBreakfast`
330
+ # @return [Boolean]
331
+ attr_accessor :serves_breakfast
332
+ alias_method :serves_breakfast?, :serves_breakfast
333
+
334
+ # Output only. Specifies if the place serves brunch.
335
+ # Corresponds to the JSON property `servesBrunch`
336
+ # @return [Boolean]
337
+ attr_accessor :serves_brunch
338
+ alias_method :serves_brunch?, :serves_brunch
339
+
340
+ # Output only. Specifies if the place serves dinner.
341
+ # Corresponds to the JSON property `servesDinner`
342
+ # @return [Boolean]
343
+ attr_accessor :serves_dinner
344
+ alias_method :serves_dinner?, :serves_dinner
345
+
346
+ # Output only. Specifies if the place serves lunch.
347
+ # Corresponds to the JSON property `servesLunch`
348
+ # @return [Boolean]
349
+ attr_accessor :serves_lunch
350
+ alias_method :serves_lunch?, :serves_lunch
351
+
352
+ # Output only. Specifies if the place serves vegetarian food.
353
+ # Corresponds to the JSON property `servesVegetarianFood`
354
+ # @return [Boolean]
355
+ attr_accessor :serves_vegetarian_food
356
+ alias_method :serves_vegetarian_food?, :serves_vegetarian_food
357
+
358
+ # Output only. Specifies if the place serves wine.
359
+ # Corresponds to the JSON property `servesWine`
360
+ # @return [Boolean]
361
+ attr_accessor :serves_wine
362
+ alias_method :serves_wine?, :serves_wine
363
+
364
+ # Output only. Specifies if the business supports takeout.
365
+ # Corresponds to the JSON property `takeout`
366
+ # @return [Boolean]
367
+ attr_accessor :takeout
368
+ alias_method :takeout?, :takeout
369
+
370
+ # Output only. A set of type tags for this result. For example, "political" and "
371
+ # locality".
372
+ # Corresponds to the JSON property `types`
373
+ # @return [Array<String>]
374
+ attr_accessor :types
375
+
376
+ # Output only. The total number of reviews (with or without text) for this place.
377
+ # Corresponds to the JSON property `userRatingCount`
378
+ # @return [Fixnum]
379
+ attr_accessor :user_rating_count
380
+
381
+ # Output only. Number of minutes this place's timezone is currently offset from
382
+ # UTC. This is expressed in minutes to support timezones that are offset by
383
+ # fractions of an hour, e.g. X hours and 15 minutes.
384
+ # Corresponds to the JSON property `utcOffsetMinutes`
385
+ # @return [Fixnum]
386
+ attr_accessor :utc_offset_minutes
387
+
388
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
389
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
390
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
391
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
392
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
393
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
394
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
395
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
396
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
397
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
398
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
399
+ # populated, and the represented box cannot be empty (as specified by the
400
+ # definitions above). An empty viewport will result in an error. For example,
401
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
402
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
403
+ # 70018 ` `
404
+ # Corresponds to the JSON property `viewport`
405
+ # @return [Google::Apis::PlacesV1::GoogleGeoTypeViewport]
406
+ attr_accessor :viewport
407
+
408
+ # Output only. The authoritative website for this place, e.g. a business'
409
+ # homepage. Note that for places that are part of a chain (e.g. an IKEA store),
410
+ # this will usually be the website for the individual store, not the overall
411
+ # chain.
412
+ # Corresponds to the JSON property `websiteUri`
413
+ # @return [String]
414
+ attr_accessor :website_uri
415
+
416
+ # Output only. Specifies if the place has an entrance that is wheelchair-
417
+ # accessible.
418
+ # Corresponds to the JSON property `wheelchairAccessibleEntrance`
419
+ # @return [Boolean]
420
+ attr_accessor :wheelchair_accessible_entrance
421
+ alias_method :wheelchair_accessible_entrance?, :wheelchair_accessible_entrance
422
+
423
+ def initialize(**args)
424
+ update!(**args)
425
+ end
426
+
427
+ # Update properties of this object
428
+ def update!(**args)
429
+ @address_components = args[:address_components] if args.key?(:address_components)
430
+ @adr_format_address = args[:adr_format_address] if args.key?(:adr_format_address)
431
+ @attributions = args[:attributions] if args.key?(:attributions)
432
+ @business_status = args[:business_status] if args.key?(:business_status)
433
+ @curbside_pickup = args[:curbside_pickup] if args.key?(:curbside_pickup)
434
+ @current_opening_hours = args[:current_opening_hours] if args.key?(:current_opening_hours)
435
+ @current_secondary_opening_hours = args[:current_secondary_opening_hours] if args.key?(:current_secondary_opening_hours)
436
+ @delivery = args[:delivery] if args.key?(:delivery)
437
+ @dine_in = args[:dine_in] if args.key?(:dine_in)
438
+ @display_name = args[:display_name] if args.key?(:display_name)
439
+ @editorial_summary = args[:editorial_summary] if args.key?(:editorial_summary)
440
+ @formatted_address = args[:formatted_address] if args.key?(:formatted_address)
441
+ @google_maps_uri = args[:google_maps_uri] if args.key?(:google_maps_uri)
442
+ @icon_background_color = args[:icon_background_color] if args.key?(:icon_background_color)
443
+ @icon_mask_base_uri = args[:icon_mask_base_uri] if args.key?(:icon_mask_base_uri)
444
+ @id = args[:id] if args.key?(:id)
445
+ @international_phone_number = args[:international_phone_number] if args.key?(:international_phone_number)
446
+ @location = args[:location] if args.key?(:location)
447
+ @name = args[:name] if args.key?(:name)
448
+ @national_phone_number = args[:national_phone_number] if args.key?(:national_phone_number)
449
+ @opening_hours = args[:opening_hours] if args.key?(:opening_hours)
450
+ @plus_code = args[:plus_code] if args.key?(:plus_code)
451
+ @price_level = args[:price_level] if args.key?(:price_level)
452
+ @rating = args[:rating] if args.key?(:rating)
453
+ @reservable = args[:reservable] if args.key?(:reservable)
454
+ @reviews = args[:reviews] if args.key?(:reviews)
455
+ @secondary_opening_hours = args[:secondary_opening_hours] if args.key?(:secondary_opening_hours)
456
+ @serves_beer = args[:serves_beer] if args.key?(:serves_beer)
457
+ @serves_breakfast = args[:serves_breakfast] if args.key?(:serves_breakfast)
458
+ @serves_brunch = args[:serves_brunch] if args.key?(:serves_brunch)
459
+ @serves_dinner = args[:serves_dinner] if args.key?(:serves_dinner)
460
+ @serves_lunch = args[:serves_lunch] if args.key?(:serves_lunch)
461
+ @serves_vegetarian_food = args[:serves_vegetarian_food] if args.key?(:serves_vegetarian_food)
462
+ @serves_wine = args[:serves_wine] if args.key?(:serves_wine)
463
+ @takeout = args[:takeout] if args.key?(:takeout)
464
+ @types = args[:types] if args.key?(:types)
465
+ @user_rating_count = args[:user_rating_count] if args.key?(:user_rating_count)
466
+ @utc_offset_minutes = args[:utc_offset_minutes] if args.key?(:utc_offset_minutes)
467
+ @viewport = args[:viewport] if args.key?(:viewport)
468
+ @website_uri = args[:website_uri] if args.key?(:website_uri)
469
+ @wheelchair_accessible_entrance = args[:wheelchair_accessible_entrance] if args.key?(:wheelchair_accessible_entrance)
470
+ end
471
+ end
472
+
473
+ # The structured components that form the formatted address, if this information
474
+ # is available.
475
+ class GoogleMapsPlacesV1PlaceAddressComponent
476
+ include Google::Apis::Core::Hashable
477
+
478
+ # Output only. The language used to format this components, in CLDR notation.
479
+ # Corresponds to the JSON property `languageCode`
480
+ # @return [String]
481
+ attr_accessor :language_code
482
+
483
+ # Output only. The full text description or name of the address component. For
484
+ # example, an address component for the country Australia may have a long_name
485
+ # of "Australia".
486
+ # Corresponds to the JSON property `longText`
487
+ # @return [String]
488
+ attr_accessor :long_text
489
+
490
+ # Output only. An abbreviated textual name for the address component, if
491
+ # available. For example, an address component for the country of Australia may
492
+ # have a short_name of "AU".
493
+ # Corresponds to the JSON property `shortText`
494
+ # @return [String]
495
+ attr_accessor :short_text
496
+
497
+ # Output only. An array indicating the type(s) of the address component.
498
+ # Corresponds to the JSON property `types`
499
+ # @return [Array<String>]
500
+ attr_accessor :types
501
+
502
+ def initialize(**args)
503
+ update!(**args)
504
+ end
505
+
506
+ # Update properties of this object
507
+ def update!(**args)
508
+ @language_code = args[:language_code] if args.key?(:language_code)
509
+ @long_text = args[:long_text] if args.key?(:long_text)
510
+ @short_text = args[:short_text] if args.key?(:short_text)
511
+ @types = args[:types] if args.key?(:types)
512
+ end
513
+ end
514
+
515
+ # Information about data providers of this place.
516
+ class GoogleMapsPlacesV1PlaceAttribution
517
+ include Google::Apis::Core::Hashable
518
+
519
+ # Output only. Name of the Place's data provider.
520
+ # Corresponds to the JSON property `provider`
521
+ # @return [String]
522
+ attr_accessor :provider
523
+
524
+ # Output only. URI to the Place's data provider.
525
+ # Corresponds to the JSON property `providerUri`
526
+ # @return [String]
527
+ attr_accessor :provider_uri
528
+
529
+ def initialize(**args)
530
+ update!(**args)
531
+ end
532
+
533
+ # Update properties of this object
534
+ def update!(**args)
535
+ @provider = args[:provider] if args.key?(:provider)
536
+ @provider_uri = args[:provider_uri] if args.key?(:provider_uri)
537
+ end
538
+ end
539
+
540
+ # Information about business hour of the place.
541
+ class GoogleMapsPlacesV1PlaceOpeningHours
542
+ include Google::Apis::Core::Hashable
543
+
544
+ # Output only. Is this place open right now? Always present unless we lack time-
545
+ # of-day or timezone data for these opening hours.
546
+ # Corresponds to the JSON property `openNow`
547
+ # @return [Boolean]
548
+ attr_accessor :open_now
549
+ alias_method :open_now?, :open_now
550
+
551
+ # Output only. The periods that this place is open during the week. The periods
552
+ # are in chronological order, starting with Sunday in the place-local timezone.
553
+ # An empty (but not absent) value indicates a place that is never open, e.g.
554
+ # because it is closed temporarily for renovations.
555
+ # Corresponds to the JSON property `periods`
556
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriod>]
557
+ attr_accessor :periods
558
+
559
+ # Output only. A type string used to identify the type of secondary hours.
560
+ # Corresponds to the JSON property `secondaryHoursType`
561
+ # @return [String]
562
+ attr_accessor :secondary_hours_type
563
+
564
+ # Output only. Structured information for special days that fall within the
565
+ # period that the returned opening hours cover. Special days are days that could
566
+ # impact the business hours of a place, e.g. Christmas day. Set for
567
+ # current_opening_hours and current_secondary_opening_hours if there are
568
+ # exceptional hours.
569
+ # Corresponds to the JSON property `specialDays`
570
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay>]
571
+ attr_accessor :special_days
572
+
573
+ # Output only. Localized strings describing the opening hours of this place, one
574
+ # string for each day of the week. Will be empty if the hours are unknown or
575
+ # could not be converted to localized text. Example: "Sun: 18:00–06:00"
576
+ # Corresponds to the JSON property `weekdayDescriptions`
577
+ # @return [Array<String>]
578
+ attr_accessor :weekday_descriptions
579
+
580
+ def initialize(**args)
581
+ update!(**args)
582
+ end
583
+
584
+ # Update properties of this object
585
+ def update!(**args)
586
+ @open_now = args[:open_now] if args.key?(:open_now)
587
+ @periods = args[:periods] if args.key?(:periods)
588
+ @secondary_hours_type = args[:secondary_hours_type] if args.key?(:secondary_hours_type)
589
+ @special_days = args[:special_days] if args.key?(:special_days)
590
+ @weekday_descriptions = args[:weekday_descriptions] if args.key?(:weekday_descriptions)
591
+ end
592
+ end
593
+
594
+ # A period the place remains in open_now status.
595
+ class GoogleMapsPlacesV1PlaceOpeningHoursPeriod
596
+ include Google::Apis::Core::Hashable
597
+
598
+ # Status changing points.
599
+ # Corresponds to the JSON property `close`
600
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint]
601
+ attr_accessor :close
602
+
603
+ # Status changing points.
604
+ # Corresponds to the JSON property `open`
605
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint]
606
+ attr_accessor :open
607
+
608
+ def initialize(**args)
609
+ update!(**args)
610
+ end
611
+
612
+ # Update properties of this object
613
+ def update!(**args)
614
+ @close = args[:close] if args.key?(:close)
615
+ @open = args[:open] if args.key?(:open)
616
+ end
617
+ end
618
+
619
+ # Status changing points.
620
+ class GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint
621
+ include Google::Apis::Core::Hashable
622
+
623
+ # Represents a whole or partial calendar date, such as a birthday. The time of
624
+ # day and time zone are either specified elsewhere or are insignificant. The
625
+ # date is relative to the Gregorian Calendar. This can represent one of the
626
+ # following: * A full date, with non-zero year, month, and day values. * A month
627
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
628
+ # with a zero month and a zero day. * A year and month, with a zero day (for
629
+ # example, a credit card expiration date). Related types: * google.type.
630
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
631
+ # Corresponds to the JSON property `date`
632
+ # @return [Google::Apis::PlacesV1::GoogleTypeDate]
633
+ attr_accessor :date
634
+
635
+ # Output only. Date of the endpoint expressed in RFC3339 format in the local
636
+ # timezone for the place. For example 2010-12-31.
637
+ # Corresponds to the JSON property `dateDeprecated`
638
+ # @return [String]
639
+ attr_accessor :date_deprecated
640
+
641
+ # Output only. A day of the week, as an integer in the range 0-6. 0 is Sunday, 1
642
+ # is Monday, etc.
643
+ # Corresponds to the JSON property `day`
644
+ # @return [Fixnum]
645
+ attr_accessor :day
646
+
647
+ # Output only. The hour in 2 digits. Ranges from 00 to 23.
648
+ # Corresponds to the JSON property `hour`
649
+ # @return [Fixnum]
650
+ attr_accessor :hour
651
+
652
+ # Output only. The minute in 2 digits. Ranges from 00 to 59.
653
+ # Corresponds to the JSON property `minute`
654
+ # @return [Fixnum]
655
+ attr_accessor :minute
656
+
657
+ # Output only. Whether or not this endpoint was truncated. Truncation occurs
658
+ # when the real hours are outside the times we are willing to return hours
659
+ # between, so we truncate the hours back to these boundaries. This ensures that
660
+ # at most 24 * 7 hours from midnight of the day of the request are returned.
661
+ # Corresponds to the JSON property `truncated`
662
+ # @return [Boolean]
663
+ attr_accessor :truncated
664
+ alias_method :truncated?, :truncated
665
+
666
+ def initialize(**args)
667
+ update!(**args)
668
+ end
669
+
670
+ # Update properties of this object
671
+ def update!(**args)
672
+ @date = args[:date] if args.key?(:date)
673
+ @date_deprecated = args[:date_deprecated] if args.key?(:date_deprecated)
674
+ @day = args[:day] if args.key?(:day)
675
+ @hour = args[:hour] if args.key?(:hour)
676
+ @minute = args[:minute] if args.key?(:minute)
677
+ @truncated = args[:truncated] if args.key?(:truncated)
678
+ end
679
+ end
680
+
681
+ # Structured information for special days that fall within the period that the
682
+ # returned opening hours cover. Special days are days that could impact the
683
+ # business hours of a place, e.g. Christmas day.
684
+ class GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay
685
+ include Google::Apis::Core::Hashable
686
+
687
+ # Represents a whole or partial calendar date, such as a birthday. The time of
688
+ # day and time zone are either specified elsewhere or are insignificant. The
689
+ # date is relative to the Gregorian Calendar. This can represent one of the
690
+ # following: * A full date, with non-zero year, month, and day values. * A month
691
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
692
+ # with a zero month and a zero day. * A year and month, with a zero day (for
693
+ # example, a credit card expiration date). Related types: * google.type.
694
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
695
+ # Corresponds to the JSON property `date`
696
+ # @return [Google::Apis::PlacesV1::GoogleTypeDate]
697
+ attr_accessor :date
698
+
699
+ def initialize(**args)
700
+ update!(**args)
701
+ end
702
+
703
+ # Update properties of this object
704
+ def update!(**args)
705
+ @date = args[:date] if args.key?(:date)
706
+ end
707
+ end
708
+
709
+ # Plus code (http://plus.codes) is a location reference with two formats: global
710
+ # code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and
711
+ # compound code, replacing the prefix with a reference location.
712
+ class GoogleMapsPlacesV1PlacePlusCode
713
+ include Google::Apis::Core::Hashable
714
+
715
+ # Output only. Place's compound code, such as "33GV+HQ, Ramberg, Norway",
716
+ # containing the suffix of the global code and replacing the prefix with a
717
+ # formatted name of a reference entity.
718
+ # Corresponds to the JSON property `compoundCode`
719
+ # @return [String]
720
+ attr_accessor :compound_code
721
+
722
+ # Output only. Place's global (full) code, such as "9FWM33GV+HQ", representing
723
+ # an 1/8000 by 1/8000 degree area (~14 by 14 meters).
724
+ # Corresponds to the JSON property `globalCode`
725
+ # @return [String]
726
+ attr_accessor :global_code
727
+
728
+ def initialize(**args)
729
+ update!(**args)
730
+ end
731
+
732
+ # Update properties of this object
733
+ def update!(**args)
734
+ @compound_code = args[:compound_code] if args.key?(:compound_code)
735
+ @global_code = args[:global_code] if args.key?(:global_code)
736
+ end
737
+ end
738
+
739
+ # Information about a review of the place.
740
+ class GoogleMapsPlacesV1PlaceReview
741
+ include Google::Apis::Core::Hashable
742
+
743
+ # Information about the author of the UGC data. Used in Photo, and Review.
744
+ # Corresponds to the JSON property `authorAttribution`
745
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1AuthorAttribution]
746
+ attr_accessor :author_attribution
747
+
748
+ # Output only. A BCP-47 language code indicating the original language of the
749
+ # review. If the review has been translated, then original_language != language.
750
+ # This field contains the main language tag only, and not the secondary tag
751
+ # indicating country or region. For example, all the English reviews are tagged
752
+ # as 'en', and not 'en-AU' or 'en-UK' and so on.This field is empty if there is
753
+ # only a rating with no review text.
754
+ # Corresponds to the JSON property `originalLanguageCode`
755
+ # @return [String]
756
+ attr_accessor :original_language_code
757
+
758
+ # Localized variant of a text in a particular language.
759
+ # Corresponds to the JSON property `originalText`
760
+ # @return [Google::Apis::PlacesV1::GoogleTypeLocalizedText]
761
+ attr_accessor :original_text
762
+
763
+ # Output only. Timestamp for the review, expressed in seconds since epoch.
764
+ # Corresponds to the JSON property `publishTime`
765
+ # @return [String]
766
+ attr_accessor :publish_time
767
+
768
+ # Output only. A whole number between 1.0 and 5.0, a.k.a. the number of stars.
769
+ # Corresponds to the JSON property `rating`
770
+ # @return [Float]
771
+ attr_accessor :rating
772
+
773
+ # Output only. A string of formatted recent time, expressing the review time
774
+ # relative to the current time in a form appropriate for the language and
775
+ # country.
776
+ # Corresponds to the JSON property `relativePublishTimeDescription`
777
+ # @return [String]
778
+ attr_accessor :relative_publish_time_description
779
+
780
+ # Localized variant of a text in a particular language.
781
+ # Corresponds to the JSON property `text`
782
+ # @return [Google::Apis::PlacesV1::GoogleTypeLocalizedText]
783
+ attr_accessor :text
784
+
785
+ # Output only. A boolean value indicating if the review was translated from the
786
+ # original language it was written in. If a review has been translated,
787
+ # corresponding to a value of true, Google recommends that you indicate this to
788
+ # your users. For example, you can add the following string, “Translated by
789
+ # Google”, to the review.
790
+ # Corresponds to the JSON property `translated`
791
+ # @return [Boolean]
792
+ attr_accessor :translated
793
+ alias_method :translated?, :translated
794
+
795
+ def initialize(**args)
796
+ update!(**args)
797
+ end
798
+
799
+ # Update properties of this object
800
+ def update!(**args)
801
+ @author_attribution = args[:author_attribution] if args.key?(:author_attribution)
802
+ @original_language_code = args[:original_language_code] if args.key?(:original_language_code)
803
+ @original_text = args[:original_text] if args.key?(:original_text)
804
+ @publish_time = args[:publish_time] if args.key?(:publish_time)
805
+ @rating = args[:rating] if args.key?(:rating)
806
+ @relative_publish_time_description = args[:relative_publish_time_description] if args.key?(:relative_publish_time_description)
807
+ @text = args[:text] if args.key?(:text)
808
+ @translated = args[:translated] if args.key?(:translated)
809
+ end
810
+ end
811
+
812
+ # Request proto for SearchText.
813
+ class GoogleMapsPlacesV1SearchTextRequest
814
+ include Google::Apis::Core::Hashable
815
+
816
+ # The requested place type. Full list of types supported: https://developers.
817
+ # google.com/places/supported_types. Only support one included type.
818
+ # Corresponds to the JSON property `includedType`
819
+ # @return [String]
820
+ attr_accessor :included_type
821
+
822
+ # Place details will be displayed with the preferred language if available. If
823
+ # the language code is unspecified or unrecognized, place details of any
824
+ # language may be returned, with a preference for English if such details exist.
825
+ # Current list of supported languages: https://developers.google.com/maps/faq#
826
+ # languagesupport.
827
+ # Corresponds to the JSON property `languageCode`
828
+ # @return [String]
829
+ attr_accessor :language_code
830
+
831
+ # [Deprecated!]The region to search.
832
+ # Corresponds to the JSON property `location`
833
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocation]
834
+ attr_accessor :location
835
+
836
+ # The region to search. This location serves as a bias which means results
837
+ # around given location might be returned.
838
+ # Corresponds to the JSON property `locationBias`
839
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationBias]
840
+ attr_accessor :location_bias
841
+
842
+ # The region to search. This location serves as a restriction which means
843
+ # results outside given location will not be returned.
844
+ # Corresponds to the JSON property `locationRestriction`
845
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1SearchTextRequestLocationRestriction]
846
+ attr_accessor :location_restriction
847
+
848
+ # Maximum number of results to return. It must be between 1 and 20, inclusively.
849
+ # If the number is unset, it falls back to the upper limit. If the number is set
850
+ # to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.
851
+ # Corresponds to the JSON property `maxResultCount`
852
+ # @return [Fixnum]
853
+ attr_accessor :max_result_count
854
+
855
+ # Filter out results whose average user rating is strictly less than this limit.
856
+ # A valid value must be an float between 0 and 5 (inclusively) at a 0.5 cadence
857
+ # i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. This is to keep parity with
858
+ # LocalRefinement_UserRating. The input rating will round up to the nearest 0.5(
859
+ # ceiling). For instance, a rating of 0.6 will eliminate all results with a less
860
+ # than 1.0 rating.
861
+ # Corresponds to the JSON property `minRating`
862
+ # @return [Float]
863
+ attr_accessor :min_rating
864
+
865
+ # Used to restrict the search to places that are open at a specific time.
866
+ # open_now marks if a business is currently open.
867
+ # Corresponds to the JSON property `openNow`
868
+ # @return [Boolean]
869
+ attr_accessor :open_now
870
+ alias_method :open_now?, :open_now
871
+
872
+ # Used to restrict the search to places that are marked as certain price levels.
873
+ # Users can choose any combinations of price levels. Default to select all price
874
+ # levels.
875
+ # Corresponds to the JSON property `priceLevels`
876
+ # @return [Array<String>]
877
+ attr_accessor :price_levels
878
+
879
+ # int 32 range. Both min and max are optional. If only min is set, then the
880
+ # range only has a lower bound. If only max is set, then range only has an upper
881
+ # bound. At least one of min and max must be set. Values are inclusive.
882
+ # Corresponds to the JSON property `priceRange`
883
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1Int32Range]
884
+ attr_accessor :price_range
885
+
886
+ # How results will be ranked in the response.
887
+ # Corresponds to the JSON property `rankPreference`
888
+ # @return [String]
889
+ attr_accessor :rank_preference
890
+
891
+ # The Unicode country/region code (CLDR) of the location where the request is
892
+ # coming from. It is used to display the place details, like region-specific
893
+ # place name, if available. For more information, see http://www.unicode.org/
894
+ # reports/tr35/#unicode_region_subtag. Note that 3-digit region codes are not
895
+ # currently supported.
896
+ # Corresponds to the JSON property `regionCode`
897
+ # @return [String]
898
+ attr_accessor :region_code
899
+
900
+ # Used to set strict type filtering for included_type. If set to true, only
901
+ # results of the same type will be returned. Default to false.
902
+ # Corresponds to the JSON property `strictTypeFiltering`
903
+ # @return [Boolean]
904
+ attr_accessor :strict_type_filtering
905
+ alias_method :strict_type_filtering?, :strict_type_filtering
906
+
907
+ # Required. The text query for textual search.
908
+ # Corresponds to the JSON property `textQuery`
909
+ # @return [String]
910
+ attr_accessor :text_query
911
+
912
+ def initialize(**args)
913
+ update!(**args)
914
+ end
915
+
916
+ # Update properties of this object
917
+ def update!(**args)
918
+ @included_type = args[:included_type] if args.key?(:included_type)
919
+ @language_code = args[:language_code] if args.key?(:language_code)
920
+ @location = args[:location] if args.key?(:location)
921
+ @location_bias = args[:location_bias] if args.key?(:location_bias)
922
+ @location_restriction = args[:location_restriction] if args.key?(:location_restriction)
923
+ @max_result_count = args[:max_result_count] if args.key?(:max_result_count)
924
+ @min_rating = args[:min_rating] if args.key?(:min_rating)
925
+ @open_now = args[:open_now] if args.key?(:open_now)
926
+ @price_levels = args[:price_levels] if args.key?(:price_levels)
927
+ @price_range = args[:price_range] if args.key?(:price_range)
928
+ @rank_preference = args[:rank_preference] if args.key?(:rank_preference)
929
+ @region_code = args[:region_code] if args.key?(:region_code)
930
+ @strict_type_filtering = args[:strict_type_filtering] if args.key?(:strict_type_filtering)
931
+ @text_query = args[:text_query] if args.key?(:text_query)
932
+ end
933
+ end
934
+
935
+ # [Deprecated!]The region to search.
936
+ class GoogleMapsPlacesV1SearchTextRequestLocation
937
+ include Google::Apis::Core::Hashable
938
+
939
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
940
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
941
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
942
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
943
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
944
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
945
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
946
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
947
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
948
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
949
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
950
+ # populated, and the represented box cannot be empty (as specified by the
951
+ # definitions above). An empty viewport will result in an error. For example,
952
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
953
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
954
+ # 70018 ` `
955
+ # Corresponds to the JSON property `rectangle`
956
+ # @return [Google::Apis::PlacesV1::GoogleGeoTypeViewport]
957
+ attr_accessor :rectangle
958
+
959
+ # Make location field a strict restriction and filter out POIs outside of the
960
+ # given location. If location type field is unset this field will have no effect.
961
+ # Corresponds to the JSON property `strictRestriction`
962
+ # @return [Boolean]
963
+ attr_accessor :strict_restriction
964
+ alias_method :strict_restriction?, :strict_restriction
965
+
966
+ def initialize(**args)
967
+ update!(**args)
968
+ end
969
+
970
+ # Update properties of this object
971
+ def update!(**args)
972
+ @rectangle = args[:rectangle] if args.key?(:rectangle)
973
+ @strict_restriction = args[:strict_restriction] if args.key?(:strict_restriction)
974
+ end
975
+ end
976
+
977
+ # The region to search. This location serves as a bias which means results
978
+ # around given location might be returned.
979
+ class GoogleMapsPlacesV1SearchTextRequestLocationBias
980
+ include Google::Apis::Core::Hashable
981
+
982
+ # Circle with a LatLng as center and radius.
983
+ # Corresponds to the JSON property `circle`
984
+ # @return [Google::Apis::PlacesV1::GoogleMapsPlacesV1Circle]
985
+ attr_accessor :circle
986
+
987
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
988
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
989
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
990
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
991
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
992
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
993
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
994
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
995
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
996
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
997
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
998
+ # populated, and the represented box cannot be empty (as specified by the
999
+ # definitions above). An empty viewport will result in an error. For example,
1000
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
1001
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
1002
+ # 70018 ` `
1003
+ # Corresponds to the JSON property `rectangle`
1004
+ # @return [Google::Apis::PlacesV1::GoogleGeoTypeViewport]
1005
+ attr_accessor :rectangle
1006
+
1007
+ def initialize(**args)
1008
+ update!(**args)
1009
+ end
1010
+
1011
+ # Update properties of this object
1012
+ def update!(**args)
1013
+ @circle = args[:circle] if args.key?(:circle)
1014
+ @rectangle = args[:rectangle] if args.key?(:rectangle)
1015
+ end
1016
+ end
1017
+
1018
+ # The region to search. This location serves as a restriction which means
1019
+ # results outside given location will not be returned.
1020
+ class GoogleMapsPlacesV1SearchTextRequestLocationRestriction
1021
+ include Google::Apis::Core::Hashable
1022
+
1023
+ # A latitude-longitude viewport, represented as two diagonally opposite `low`
1024
+ # and `high` points. A viewport is considered a closed region, i.e. it includes
1025
+ # its boundary. The latitude bounds must range between -90 to 90 degrees
1026
+ # inclusive, and the longitude bounds must range between -180 to 180 degrees
1027
+ # inclusive. Various cases include: - If `low` = `high`, the viewport consists
1028
+ # of that single point. - If `low.longitude` > `high.longitude`, the longitude
1029
+ # range is inverted (the viewport crosses the 180 degree longitude line). - If `
1030
+ # low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport
1031
+ # includes all longitudes. - If `low.longitude` = 180 degrees and `high.
1032
+ # longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` >
1033
+ # `high.latitude`, the latitude range is empty. Both `low` and `high` must be
1034
+ # populated, and the represented box cannot be empty (as specified by the
1035
+ # definitions above). An empty viewport will result in an error. For example,
1036
+ # this viewport fully encloses New York City: ` "low": ` "latitude": 40.477398, "
1037
+ # longitude": -74.259087 `, "high": ` "latitude": 40.91618, "longitude": -73.
1038
+ # 70018 ` `
1039
+ # Corresponds to the JSON property `rectangle`
1040
+ # @return [Google::Apis::PlacesV1::GoogleGeoTypeViewport]
1041
+ attr_accessor :rectangle
1042
+
1043
+ def initialize(**args)
1044
+ update!(**args)
1045
+ end
1046
+
1047
+ # Update properties of this object
1048
+ def update!(**args)
1049
+ @rectangle = args[:rectangle] if args.key?(:rectangle)
1050
+ end
1051
+ end
1052
+
1053
+ # Response proto for SearchText.
1054
+ class GoogleMapsPlacesV1SearchTextResponse
1055
+ include Google::Apis::Core::Hashable
1056
+
1057
+ # A list of places that meet the user's text search criteria.
1058
+ # Corresponds to the JSON property `places`
1059
+ # @return [Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1Place>]
1060
+ attr_accessor :places
1061
+
1062
+ def initialize(**args)
1063
+ update!(**args)
1064
+ end
1065
+
1066
+ # Update properties of this object
1067
+ def update!(**args)
1068
+ @places = args[:places] if args.key?(:places)
1069
+ end
1070
+ end
1071
+
1072
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1073
+ # day and time zone are either specified elsewhere or are insignificant. The
1074
+ # date is relative to the Gregorian Calendar. This can represent one of the
1075
+ # following: * A full date, with non-zero year, month, and day values. * A month
1076
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1077
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1078
+ # example, a credit card expiration date). Related types: * google.type.
1079
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1080
+ class GoogleTypeDate
1081
+ include Google::Apis::Core::Hashable
1082
+
1083
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
1084
+ # specify a year by itself or a year and month where the day isn't significant.
1085
+ # Corresponds to the JSON property `day`
1086
+ # @return [Fixnum]
1087
+ attr_accessor :day
1088
+
1089
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
1090
+ # and day.
1091
+ # Corresponds to the JSON property `month`
1092
+ # @return [Fixnum]
1093
+ attr_accessor :month
1094
+
1095
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
1096
+ # year.
1097
+ # Corresponds to the JSON property `year`
1098
+ # @return [Fixnum]
1099
+ attr_accessor :year
1100
+
1101
+ def initialize(**args)
1102
+ update!(**args)
1103
+ end
1104
+
1105
+ # Update properties of this object
1106
+ def update!(**args)
1107
+ @day = args[:day] if args.key?(:day)
1108
+ @month = args[:month] if args.key?(:month)
1109
+ @year = args[:year] if args.key?(:year)
1110
+ end
1111
+ end
1112
+
1113
+ # An object that represents a latitude/longitude pair. This is expressed as a
1114
+ # pair of doubles to represent degrees latitude and degrees longitude. Unless
1115
+ # specified otherwise, this object must conform to the WGS84 standard. Values
1116
+ # must be within normalized ranges.
1117
+ class GoogleTypeLatLng
1118
+ include Google::Apis::Core::Hashable
1119
+
1120
+ # The latitude in degrees. It must be in the range [-90.0, +90.0].
1121
+ # Corresponds to the JSON property `latitude`
1122
+ # @return [Float]
1123
+ attr_accessor :latitude
1124
+
1125
+ # The longitude in degrees. It must be in the range [-180.0, +180.0].
1126
+ # Corresponds to the JSON property `longitude`
1127
+ # @return [Float]
1128
+ attr_accessor :longitude
1129
+
1130
+ def initialize(**args)
1131
+ update!(**args)
1132
+ end
1133
+
1134
+ # Update properties of this object
1135
+ def update!(**args)
1136
+ @latitude = args[:latitude] if args.key?(:latitude)
1137
+ @longitude = args[:longitude] if args.key?(:longitude)
1138
+ end
1139
+ end
1140
+
1141
+ # Localized variant of a text in a particular language.
1142
+ class GoogleTypeLocalizedText
1143
+ include Google::Apis::Core::Hashable
1144
+
1145
+ # The text's BCP-47 language code, such as "en-US" or "sr-Latn". For more
1146
+ # information, see http://www.unicode.org/reports/tr35/#
1147
+ # Unicode_locale_identifier.
1148
+ # Corresponds to the JSON property `languageCode`
1149
+ # @return [String]
1150
+ attr_accessor :language_code
1151
+
1152
+ # Localized string in the language corresponding to `language_code' below.
1153
+ # Corresponds to the JSON property `text`
1154
+ # @return [String]
1155
+ attr_accessor :text
1156
+
1157
+ def initialize(**args)
1158
+ update!(**args)
1159
+ end
1160
+
1161
+ # Update properties of this object
1162
+ def update!(**args)
1163
+ @language_code = args[:language_code] if args.key?(:language_code)
1164
+ @text = args[:text] if args.key?(:text)
1165
+ end
1166
+ end
1167
+ end
1168
+ end
1169
+ end