@googlemaps/places 2.2.0 → 2.3.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.
@@ -1,4 +1,4 @@
1
- // Copyright 2025 Google LLC
1
+ // Copyright 2026 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -3747,9 +3747,8 @@
3747
3747
  * Properties of a ContentBlock.
3748
3748
  * @memberof google.maps.places.v1
3749
3749
  * @interface IContentBlock
3750
- * @property {string|null} [topic] ContentBlock topic
3751
3750
  * @property {google.type.ILocalizedText|null} [content] ContentBlock content
3752
- * @property {google.maps.places.v1.IReferences|null} [references] ContentBlock references
3751
+ * @property {Array.<string>|null} [referencedPlaces] ContentBlock referencedPlaces
3753
3752
  */
3754
3753
 
3755
3754
  /**
@@ -3761,20 +3760,13 @@
3761
3760
  * @param {google.maps.places.v1.IContentBlock=} [properties] Properties to set
3762
3761
  */
3763
3762
  function ContentBlock(properties) {
3763
+ this.referencedPlaces = [];
3764
3764
  if (properties)
3765
3765
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
3766
3766
  if (properties[keys[i]] != null)
3767
3767
  this[keys[i]] = properties[keys[i]];
3768
3768
  }
3769
3769
 
3770
- /**
3771
- * ContentBlock topic.
3772
- * @member {string} topic
3773
- * @memberof google.maps.places.v1.ContentBlock
3774
- * @instance
3775
- */
3776
- ContentBlock.prototype.topic = "";
3777
-
3778
3770
  /**
3779
3771
  * ContentBlock content.
3780
3772
  * @member {google.type.ILocalizedText|null|undefined} content
@@ -3784,12 +3776,12 @@
3784
3776
  ContentBlock.prototype.content = null;
3785
3777
 
3786
3778
  /**
3787
- * ContentBlock references.
3788
- * @member {google.maps.places.v1.IReferences|null|undefined} references
3779
+ * ContentBlock referencedPlaces.
3780
+ * @member {Array.<string>} referencedPlaces
3789
3781
  * @memberof google.maps.places.v1.ContentBlock
3790
3782
  * @instance
3791
3783
  */
3792
- ContentBlock.prototype.references = null;
3784
+ ContentBlock.prototype.referencedPlaces = $util.emptyArray;
3793
3785
 
3794
3786
  /**
3795
3787
  * Creates a new ContentBlock instance using the specified properties.
@@ -3815,12 +3807,11 @@
3815
3807
  ContentBlock.encode = function encode(message, writer) {
3816
3808
  if (!writer)
3817
3809
  writer = $Writer.create();
3818
- if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
3819
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic);
3820
3810
  if (message.content != null && Object.hasOwnProperty.call(message, "content"))
3821
3811
  $root.google.type.LocalizedText.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
3822
- if (message.references != null && Object.hasOwnProperty.call(message, "references"))
3823
- $root.google.maps.places.v1.References.encode(message.references, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
3812
+ if (message.referencedPlaces != null && message.referencedPlaces.length)
3813
+ for (var i = 0; i < message.referencedPlaces.length; ++i)
3814
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.referencedPlaces[i]);
3824
3815
  return writer;
3825
3816
  };
3826
3817
 
@@ -3857,16 +3848,14 @@
3857
3848
  if (tag === error)
3858
3849
  break;
3859
3850
  switch (tag >>> 3) {
3860
- case 1: {
3861
- message.topic = reader.string();
3862
- break;
3863
- }
3864
3851
  case 2: {
3865
3852
  message.content = $root.google.type.LocalizedText.decode(reader, reader.uint32());
3866
3853
  break;
3867
3854
  }
3868
- case 3: {
3869
- message.references = $root.google.maps.places.v1.References.decode(reader, reader.uint32());
3855
+ case 4: {
3856
+ if (!(message.referencedPlaces && message.referencedPlaces.length))
3857
+ message.referencedPlaces = [];
3858
+ message.referencedPlaces.push(reader.string());
3870
3859
  break;
3871
3860
  }
3872
3861
  default:
@@ -3904,18 +3893,17 @@
3904
3893
  ContentBlock.verify = function verify(message) {
3905
3894
  if (typeof message !== "object" || message === null)
3906
3895
  return "object expected";
3907
- if (message.topic != null && message.hasOwnProperty("topic"))
3908
- if (!$util.isString(message.topic))
3909
- return "topic: string expected";
3910
3896
  if (message.content != null && message.hasOwnProperty("content")) {
3911
3897
  var error = $root.google.type.LocalizedText.verify(message.content);
3912
3898
  if (error)
3913
3899
  return "content." + error;
3914
3900
  }
3915
- if (message.references != null && message.hasOwnProperty("references")) {
3916
- var error = $root.google.maps.places.v1.References.verify(message.references);
3917
- if (error)
3918
- return "references." + error;
3901
+ if (message.referencedPlaces != null && message.hasOwnProperty("referencedPlaces")) {
3902
+ if (!Array.isArray(message.referencedPlaces))
3903
+ return "referencedPlaces: array expected";
3904
+ for (var i = 0; i < message.referencedPlaces.length; ++i)
3905
+ if (!$util.isString(message.referencedPlaces[i]))
3906
+ return "referencedPlaces: string[] expected";
3919
3907
  }
3920
3908
  return null;
3921
3909
  };
@@ -3932,17 +3920,17 @@
3932
3920
  if (object instanceof $root.google.maps.places.v1.ContentBlock)
3933
3921
  return object;
3934
3922
  var message = new $root.google.maps.places.v1.ContentBlock();
3935
- if (object.topic != null)
3936
- message.topic = String(object.topic);
3937
3923
  if (object.content != null) {
3938
3924
  if (typeof object.content !== "object")
3939
3925
  throw TypeError(".google.maps.places.v1.ContentBlock.content: object expected");
3940
3926
  message.content = $root.google.type.LocalizedText.fromObject(object.content);
3941
3927
  }
3942
- if (object.references != null) {
3943
- if (typeof object.references !== "object")
3944
- throw TypeError(".google.maps.places.v1.ContentBlock.references: object expected");
3945
- message.references = $root.google.maps.places.v1.References.fromObject(object.references);
3928
+ if (object.referencedPlaces) {
3929
+ if (!Array.isArray(object.referencedPlaces))
3930
+ throw TypeError(".google.maps.places.v1.ContentBlock.referencedPlaces: array expected");
3931
+ message.referencedPlaces = [];
3932
+ for (var i = 0; i < object.referencedPlaces.length; ++i)
3933
+ message.referencedPlaces[i] = String(object.referencedPlaces[i]);
3946
3934
  }
3947
3935
  return message;
3948
3936
  };
@@ -3960,17 +3948,17 @@
3960
3948
  if (!options)
3961
3949
  options = {};
3962
3950
  var object = {};
3963
- if (options.defaults) {
3964
- object.topic = "";
3951
+ if (options.arrays || options.defaults)
3952
+ object.referencedPlaces = [];
3953
+ if (options.defaults)
3965
3954
  object.content = null;
3966
- object.references = null;
3967
- }
3968
- if (message.topic != null && message.hasOwnProperty("topic"))
3969
- object.topic = message.topic;
3970
3955
  if (message.content != null && message.hasOwnProperty("content"))
3971
3956
  object.content = $root.google.type.LocalizedText.toObject(message.content, options);
3972
- if (message.references != null && message.hasOwnProperty("references"))
3973
- object.references = $root.google.maps.places.v1.References.toObject(message.references, options);
3957
+ if (message.referencedPlaces && message.referencedPlaces.length) {
3958
+ object.referencedPlaces = [];
3959
+ for (var j = 0; j < message.referencedPlaces.length; ++j)
3960
+ object.referencedPlaces[j] = message.referencedPlaces[j];
3961
+ }
3974
3962
  return object;
3975
3963
  };
3976
3964
 
@@ -4003,27 +3991,29 @@
4003
3991
  return ContentBlock;
4004
3992
  })();
4005
3993
 
4006
- v1.References = (function() {
3994
+ v1.ContextualContent = (function() {
4007
3995
 
4008
3996
  /**
4009
- * Properties of a References.
3997
+ * Properties of a ContextualContent.
4010
3998
  * @memberof google.maps.places.v1
4011
- * @interface IReferences
4012
- * @property {Array.<google.maps.places.v1.IReview>|null} [reviews] References reviews
4013
- * @property {Array.<string>|null} [places] References places
3999
+ * @interface IContextualContent
4000
+ * @property {Array.<google.maps.places.v1.IReview>|null} [reviews] ContextualContent reviews
4001
+ * @property {Array.<google.maps.places.v1.IPhoto>|null} [photos] ContextualContent photos
4002
+ * @property {Array.<google.maps.places.v1.ContextualContent.IJustification>|null} [justifications] ContextualContent justifications
4014
4003
  */
4015
4004
 
4016
4005
  /**
4017
- * Constructs a new References.
4006
+ * Constructs a new ContextualContent.
4018
4007
  * @memberof google.maps.places.v1
4019
- * @classdesc Represents a References.
4020
- * @implements IReferences
4008
+ * @classdesc Represents a ContextualContent.
4009
+ * @implements IContextualContent
4021
4010
  * @constructor
4022
- * @param {google.maps.places.v1.IReferences=} [properties] Properties to set
4011
+ * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set
4023
4012
  */
4024
- function References(properties) {
4013
+ function ContextualContent(properties) {
4025
4014
  this.reviews = [];
4026
- this.places = [];
4015
+ this.photos = [];
4016
+ this.justifications = [];
4027
4017
  if (properties)
4028
4018
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4029
4019
  if (properties[keys[i]] != null)
@@ -4031,82 +4021,93 @@
4031
4021
  }
4032
4022
 
4033
4023
  /**
4034
- * References reviews.
4024
+ * ContextualContent reviews.
4035
4025
  * @member {Array.<google.maps.places.v1.IReview>} reviews
4036
- * @memberof google.maps.places.v1.References
4026
+ * @memberof google.maps.places.v1.ContextualContent
4037
4027
  * @instance
4038
4028
  */
4039
- References.prototype.reviews = $util.emptyArray;
4029
+ ContextualContent.prototype.reviews = $util.emptyArray;
4040
4030
 
4041
4031
  /**
4042
- * References places.
4043
- * @member {Array.<string>} places
4044
- * @memberof google.maps.places.v1.References
4032
+ * ContextualContent photos.
4033
+ * @member {Array.<google.maps.places.v1.IPhoto>} photos
4034
+ * @memberof google.maps.places.v1.ContextualContent
4045
4035
  * @instance
4046
4036
  */
4047
- References.prototype.places = $util.emptyArray;
4037
+ ContextualContent.prototype.photos = $util.emptyArray;
4048
4038
 
4049
4039
  /**
4050
- * Creates a new References instance using the specified properties.
4040
+ * ContextualContent justifications.
4041
+ * @member {Array.<google.maps.places.v1.ContextualContent.IJustification>} justifications
4042
+ * @memberof google.maps.places.v1.ContextualContent
4043
+ * @instance
4044
+ */
4045
+ ContextualContent.prototype.justifications = $util.emptyArray;
4046
+
4047
+ /**
4048
+ * Creates a new ContextualContent instance using the specified properties.
4051
4049
  * @function create
4052
- * @memberof google.maps.places.v1.References
4050
+ * @memberof google.maps.places.v1.ContextualContent
4053
4051
  * @static
4054
- * @param {google.maps.places.v1.IReferences=} [properties] Properties to set
4055
- * @returns {google.maps.places.v1.References} References instance
4052
+ * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set
4053
+ * @returns {google.maps.places.v1.ContextualContent} ContextualContent instance
4056
4054
  */
4057
- References.create = function create(properties) {
4058
- return new References(properties);
4055
+ ContextualContent.create = function create(properties) {
4056
+ return new ContextualContent(properties);
4059
4057
  };
4060
4058
 
4061
4059
  /**
4062
- * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages.
4060
+ * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages.
4063
4061
  * @function encode
4064
- * @memberof google.maps.places.v1.References
4062
+ * @memberof google.maps.places.v1.ContextualContent
4065
4063
  * @static
4066
- * @param {google.maps.places.v1.IReferences} message References message or plain object to encode
4064
+ * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode
4067
4065
  * @param {$protobuf.Writer} [writer] Writer to encode to
4068
4066
  * @returns {$protobuf.Writer} Writer
4069
4067
  */
4070
- References.encode = function encode(message, writer) {
4068
+ ContextualContent.encode = function encode(message, writer) {
4071
4069
  if (!writer)
4072
4070
  writer = $Writer.create();
4073
4071
  if (message.reviews != null && message.reviews.length)
4074
4072
  for (var i = 0; i < message.reviews.length; ++i)
4075
4073
  $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4076
- if (message.places != null && message.places.length)
4077
- for (var i = 0; i < message.places.length; ++i)
4078
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.places[i]);
4074
+ if (message.photos != null && message.photos.length)
4075
+ for (var i = 0; i < message.photos.length; ++i)
4076
+ $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4077
+ if (message.justifications != null && message.justifications.length)
4078
+ for (var i = 0; i < message.justifications.length; ++i)
4079
+ $root.google.maps.places.v1.ContextualContent.Justification.encode(message.justifications[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4079
4080
  return writer;
4080
4081
  };
4081
4082
 
4082
4083
  /**
4083
- * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages.
4084
+ * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages.
4084
4085
  * @function encodeDelimited
4085
- * @memberof google.maps.places.v1.References
4086
+ * @memberof google.maps.places.v1.ContextualContent
4086
4087
  * @static
4087
- * @param {google.maps.places.v1.IReferences} message References message or plain object to encode
4088
+ * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode
4088
4089
  * @param {$protobuf.Writer} [writer] Writer to encode to
4089
4090
  * @returns {$protobuf.Writer} Writer
4090
4091
  */
4091
- References.encodeDelimited = function encodeDelimited(message, writer) {
4092
+ ContextualContent.encodeDelimited = function encodeDelimited(message, writer) {
4092
4093
  return this.encode(message, writer).ldelim();
4093
4094
  };
4094
4095
 
4095
4096
  /**
4096
- * Decodes a References message from the specified reader or buffer.
4097
+ * Decodes a ContextualContent message from the specified reader or buffer.
4097
4098
  * @function decode
4098
- * @memberof google.maps.places.v1.References
4099
+ * @memberof google.maps.places.v1.ContextualContent
4099
4100
  * @static
4100
4101
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4101
4102
  * @param {number} [length] Message length if known beforehand
4102
- * @returns {google.maps.places.v1.References} References
4103
+ * @returns {google.maps.places.v1.ContextualContent} ContextualContent
4103
4104
  * @throws {Error} If the payload is not a reader or valid buffer
4104
4105
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4105
4106
  */
4106
- References.decode = function decode(reader, length, error) {
4107
+ ContextualContent.decode = function decode(reader, length, error) {
4107
4108
  if (!(reader instanceof $Reader))
4108
4109
  reader = $Reader.create(reader);
4109
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.References();
4110
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent();
4110
4111
  while (reader.pos < end) {
4111
4112
  var tag = reader.uint32();
4112
4113
  if (tag === error)
@@ -4119,9 +4120,15 @@
4119
4120
  break;
4120
4121
  }
4121
4122
  case 2: {
4122
- if (!(message.places && message.places.length))
4123
- message.places = [];
4124
- message.places.push(reader.string());
4123
+ if (!(message.photos && message.photos.length))
4124
+ message.photos = [];
4125
+ message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32()));
4126
+ break;
4127
+ }
4128
+ case 3: {
4129
+ if (!(message.justifications && message.justifications.length))
4130
+ message.justifications = [];
4131
+ message.justifications.push($root.google.maps.places.v1.ContextualContent.Justification.decode(reader, reader.uint32()));
4125
4132
  break;
4126
4133
  }
4127
4134
  default:
@@ -4133,30 +4140,30 @@
4133
4140
  };
4134
4141
 
4135
4142
  /**
4136
- * Decodes a References message from the specified reader or buffer, length delimited.
4143
+ * Decodes a ContextualContent message from the specified reader or buffer, length delimited.
4137
4144
  * @function decodeDelimited
4138
- * @memberof google.maps.places.v1.References
4145
+ * @memberof google.maps.places.v1.ContextualContent
4139
4146
  * @static
4140
4147
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4141
- * @returns {google.maps.places.v1.References} References
4148
+ * @returns {google.maps.places.v1.ContextualContent} ContextualContent
4142
4149
  * @throws {Error} If the payload is not a reader or valid buffer
4143
4150
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
4144
4151
  */
4145
- References.decodeDelimited = function decodeDelimited(reader) {
4152
+ ContextualContent.decodeDelimited = function decodeDelimited(reader) {
4146
4153
  if (!(reader instanceof $Reader))
4147
4154
  reader = new $Reader(reader);
4148
4155
  return this.decode(reader, reader.uint32());
4149
4156
  };
4150
4157
 
4151
4158
  /**
4152
- * Verifies a References message.
4159
+ * Verifies a ContextualContent message.
4153
4160
  * @function verify
4154
- * @memberof google.maps.places.v1.References
4161
+ * @memberof google.maps.places.v1.ContextualContent
4155
4162
  * @static
4156
4163
  * @param {Object.<string,*>} message Plain object to verify
4157
4164
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
4158
4165
  */
4159
- References.verify = function verify(message) {
4166
+ ContextualContent.verify = function verify(message) {
4160
4167
  if (typeof message !== "object" || message === null)
4161
4168
  return "object expected";
4162
4169
  if (message.reviews != null && message.hasOwnProperty("reviews")) {
@@ -4168,866 +4175,143 @@
4168
4175
  return "reviews." + error;
4169
4176
  }
4170
4177
  }
4171
- if (message.places != null && message.hasOwnProperty("places")) {
4172
- if (!Array.isArray(message.places))
4173
- return "places: array expected";
4174
- for (var i = 0; i < message.places.length; ++i)
4175
- if (!$util.isString(message.places[i]))
4176
- return "places: string[] expected";
4178
+ if (message.photos != null && message.hasOwnProperty("photos")) {
4179
+ if (!Array.isArray(message.photos))
4180
+ return "photos: array expected";
4181
+ for (var i = 0; i < message.photos.length; ++i) {
4182
+ var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]);
4183
+ if (error)
4184
+ return "photos." + error;
4185
+ }
4186
+ }
4187
+ if (message.justifications != null && message.hasOwnProperty("justifications")) {
4188
+ if (!Array.isArray(message.justifications))
4189
+ return "justifications: array expected";
4190
+ for (var i = 0; i < message.justifications.length; ++i) {
4191
+ var error = $root.google.maps.places.v1.ContextualContent.Justification.verify(message.justifications[i]);
4192
+ if (error)
4193
+ return "justifications." + error;
4194
+ }
4177
4195
  }
4178
4196
  return null;
4179
4197
  };
4180
4198
 
4181
4199
  /**
4182
- * Creates a References message from a plain object. Also converts values to their respective internal types.
4200
+ * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types.
4183
4201
  * @function fromObject
4184
- * @memberof google.maps.places.v1.References
4202
+ * @memberof google.maps.places.v1.ContextualContent
4185
4203
  * @static
4186
4204
  * @param {Object.<string,*>} object Plain object
4187
- * @returns {google.maps.places.v1.References} References
4205
+ * @returns {google.maps.places.v1.ContextualContent} ContextualContent
4188
4206
  */
4189
- References.fromObject = function fromObject(object) {
4190
- if (object instanceof $root.google.maps.places.v1.References)
4207
+ ContextualContent.fromObject = function fromObject(object) {
4208
+ if (object instanceof $root.google.maps.places.v1.ContextualContent)
4191
4209
  return object;
4192
- var message = new $root.google.maps.places.v1.References();
4210
+ var message = new $root.google.maps.places.v1.ContextualContent();
4193
4211
  if (object.reviews) {
4194
4212
  if (!Array.isArray(object.reviews))
4195
- throw TypeError(".google.maps.places.v1.References.reviews: array expected");
4213
+ throw TypeError(".google.maps.places.v1.ContextualContent.reviews: array expected");
4196
4214
  message.reviews = [];
4197
4215
  for (var i = 0; i < object.reviews.length; ++i) {
4198
4216
  if (typeof object.reviews[i] !== "object")
4199
- throw TypeError(".google.maps.places.v1.References.reviews: object expected");
4217
+ throw TypeError(".google.maps.places.v1.ContextualContent.reviews: object expected");
4200
4218
  message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]);
4201
4219
  }
4202
4220
  }
4203
- if (object.places) {
4204
- if (!Array.isArray(object.places))
4205
- throw TypeError(".google.maps.places.v1.References.places: array expected");
4206
- message.places = [];
4207
- for (var i = 0; i < object.places.length; ++i)
4208
- message.places[i] = String(object.places[i]);
4221
+ if (object.photos) {
4222
+ if (!Array.isArray(object.photos))
4223
+ throw TypeError(".google.maps.places.v1.ContextualContent.photos: array expected");
4224
+ message.photos = [];
4225
+ for (var i = 0; i < object.photos.length; ++i) {
4226
+ if (typeof object.photos[i] !== "object")
4227
+ throw TypeError(".google.maps.places.v1.ContextualContent.photos: object expected");
4228
+ message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]);
4229
+ }
4230
+ }
4231
+ if (object.justifications) {
4232
+ if (!Array.isArray(object.justifications))
4233
+ throw TypeError(".google.maps.places.v1.ContextualContent.justifications: array expected");
4234
+ message.justifications = [];
4235
+ for (var i = 0; i < object.justifications.length; ++i) {
4236
+ if (typeof object.justifications[i] !== "object")
4237
+ throw TypeError(".google.maps.places.v1.ContextualContent.justifications: object expected");
4238
+ message.justifications[i] = $root.google.maps.places.v1.ContextualContent.Justification.fromObject(object.justifications[i]);
4239
+ }
4209
4240
  }
4210
4241
  return message;
4211
4242
  };
4212
4243
 
4213
4244
  /**
4214
- * Creates a plain object from a References message. Also converts values to other types if specified.
4245
+ * Creates a plain object from a ContextualContent message. Also converts values to other types if specified.
4215
4246
  * @function toObject
4216
- * @memberof google.maps.places.v1.References
4247
+ * @memberof google.maps.places.v1.ContextualContent
4217
4248
  * @static
4218
- * @param {google.maps.places.v1.References} message References
4249
+ * @param {google.maps.places.v1.ContextualContent} message ContextualContent
4219
4250
  * @param {$protobuf.IConversionOptions} [options] Conversion options
4220
4251
  * @returns {Object.<string,*>} Plain object
4221
4252
  */
4222
- References.toObject = function toObject(message, options) {
4253
+ ContextualContent.toObject = function toObject(message, options) {
4223
4254
  if (!options)
4224
4255
  options = {};
4225
4256
  var object = {};
4226
4257
  if (options.arrays || options.defaults) {
4227
4258
  object.reviews = [];
4228
- object.places = [];
4259
+ object.photos = [];
4260
+ object.justifications = [];
4229
4261
  }
4230
4262
  if (message.reviews && message.reviews.length) {
4231
4263
  object.reviews = [];
4232
4264
  for (var j = 0; j < message.reviews.length; ++j)
4233
4265
  object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options);
4234
4266
  }
4235
- if (message.places && message.places.length) {
4236
- object.places = [];
4237
- for (var j = 0; j < message.places.length; ++j)
4238
- object.places[j] = message.places[j];
4267
+ if (message.photos && message.photos.length) {
4268
+ object.photos = [];
4269
+ for (var j = 0; j < message.photos.length; ++j)
4270
+ object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options);
4271
+ }
4272
+ if (message.justifications && message.justifications.length) {
4273
+ object.justifications = [];
4274
+ for (var j = 0; j < message.justifications.length; ++j)
4275
+ object.justifications[j] = $root.google.maps.places.v1.ContextualContent.Justification.toObject(message.justifications[j], options);
4239
4276
  }
4240
4277
  return object;
4241
4278
  };
4242
4279
 
4243
4280
  /**
4244
- * Converts this References to JSON.
4281
+ * Converts this ContextualContent to JSON.
4245
4282
  * @function toJSON
4246
- * @memberof google.maps.places.v1.References
4283
+ * @memberof google.maps.places.v1.ContextualContent
4247
4284
  * @instance
4248
4285
  * @returns {Object.<string,*>} JSON object
4249
4286
  */
4250
- References.prototype.toJSON = function toJSON() {
4287
+ ContextualContent.prototype.toJSON = function toJSON() {
4251
4288
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4252
4289
  };
4253
4290
 
4254
4291
  /**
4255
- * Gets the default type url for References
4292
+ * Gets the default type url for ContextualContent
4256
4293
  * @function getTypeUrl
4257
- * @memberof google.maps.places.v1.References
4294
+ * @memberof google.maps.places.v1.ContextualContent
4258
4295
  * @static
4259
4296
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4260
4297
  * @returns {string} The default type url
4261
4298
  */
4262
- References.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4299
+ ContextualContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4263
4300
  if (typeUrlPrefix === undefined) {
4264
4301
  typeUrlPrefix = "type.googleapis.com";
4265
4302
  }
4266
- return typeUrlPrefix + "/google.maps.places.v1.References";
4303
+ return typeUrlPrefix + "/google.maps.places.v1.ContextualContent";
4267
4304
  };
4268
4305
 
4269
- return References;
4270
- })();
4306
+ ContextualContent.Justification = (function() {
4271
4307
 
4272
- v1.Review = (function() {
4273
-
4274
- /**
4275
- * Properties of a Review.
4276
- * @memberof google.maps.places.v1
4277
- * @interface IReview
4278
- * @property {string|null} [name] Review name
4279
- * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription
4280
- * @property {google.type.ILocalizedText|null} [text] Review text
4281
- * @property {google.type.ILocalizedText|null} [originalText] Review originalText
4282
- * @property {number|null} [rating] Review rating
4283
- * @property {google.maps.places.v1.IAuthorAttribution|null} [authorAttribution] Review authorAttribution
4284
- * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime
4285
- * @property {string|null} [flagContentUri] Review flagContentUri
4286
- * @property {string|null} [googleMapsUri] Review googleMapsUri
4287
- * @property {google.type.IDate|null} [visitDate] Review visitDate
4288
- */
4289
-
4290
- /**
4291
- * Constructs a new Review.
4292
- * @memberof google.maps.places.v1
4293
- * @classdesc Represents a Review.
4294
- * @implements IReview
4295
- * @constructor
4296
- * @param {google.maps.places.v1.IReview=} [properties] Properties to set
4297
- */
4298
- function Review(properties) {
4299
- if (properties)
4300
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4301
- if (properties[keys[i]] != null)
4302
- this[keys[i]] = properties[keys[i]];
4303
- }
4304
-
4305
- /**
4306
- * Review name.
4307
- * @member {string} name
4308
- * @memberof google.maps.places.v1.Review
4309
- * @instance
4310
- */
4311
- Review.prototype.name = "";
4312
-
4313
- /**
4314
- * Review relativePublishTimeDescription.
4315
- * @member {string} relativePublishTimeDescription
4316
- * @memberof google.maps.places.v1.Review
4317
- * @instance
4318
- */
4319
- Review.prototype.relativePublishTimeDescription = "";
4320
-
4321
- /**
4322
- * Review text.
4323
- * @member {google.type.ILocalizedText|null|undefined} text
4324
- * @memberof google.maps.places.v1.Review
4325
- * @instance
4326
- */
4327
- Review.prototype.text = null;
4328
-
4329
- /**
4330
- * Review originalText.
4331
- * @member {google.type.ILocalizedText|null|undefined} originalText
4332
- * @memberof google.maps.places.v1.Review
4333
- * @instance
4334
- */
4335
- Review.prototype.originalText = null;
4336
-
4337
- /**
4338
- * Review rating.
4339
- * @member {number} rating
4340
- * @memberof google.maps.places.v1.Review
4341
- * @instance
4342
- */
4343
- Review.prototype.rating = 0;
4344
-
4345
- /**
4346
- * Review authorAttribution.
4347
- * @member {google.maps.places.v1.IAuthorAttribution|null|undefined} authorAttribution
4348
- * @memberof google.maps.places.v1.Review
4349
- * @instance
4350
- */
4351
- Review.prototype.authorAttribution = null;
4352
-
4353
- /**
4354
- * Review publishTime.
4355
- * @member {google.protobuf.ITimestamp|null|undefined} publishTime
4356
- * @memberof google.maps.places.v1.Review
4357
- * @instance
4358
- */
4359
- Review.prototype.publishTime = null;
4360
-
4361
- /**
4362
- * Review flagContentUri.
4363
- * @member {string} flagContentUri
4364
- * @memberof google.maps.places.v1.Review
4365
- * @instance
4366
- */
4367
- Review.prototype.flagContentUri = "";
4368
-
4369
- /**
4370
- * Review googleMapsUri.
4371
- * @member {string} googleMapsUri
4372
- * @memberof google.maps.places.v1.Review
4373
- * @instance
4374
- */
4375
- Review.prototype.googleMapsUri = "";
4376
-
4377
- /**
4378
- * Review visitDate.
4379
- * @member {google.type.IDate|null|undefined} visitDate
4380
- * @memberof google.maps.places.v1.Review
4381
- * @instance
4382
- */
4383
- Review.prototype.visitDate = null;
4384
-
4385
- /**
4386
- * Creates a new Review instance using the specified properties.
4387
- * @function create
4388
- * @memberof google.maps.places.v1.Review
4389
- * @static
4390
- * @param {google.maps.places.v1.IReview=} [properties] Properties to set
4391
- * @returns {google.maps.places.v1.Review} Review instance
4392
- */
4393
- Review.create = function create(properties) {
4394
- return new Review(properties);
4395
- };
4396
-
4397
- /**
4398
- * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages.
4399
- * @function encode
4400
- * @memberof google.maps.places.v1.Review
4401
- * @static
4402
- * @param {google.maps.places.v1.IReview} message Review message or plain object to encode
4403
- * @param {$protobuf.Writer} [writer] Writer to encode to
4404
- * @returns {$protobuf.Writer} Writer
4405
- */
4406
- Review.encode = function encode(message, writer) {
4407
- if (!writer)
4408
- writer = $Writer.create();
4409
- if (message.name != null && Object.hasOwnProperty.call(message, "name"))
4410
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
4411
- if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription"))
4412
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription);
4413
- if (message.rating != null && Object.hasOwnProperty.call(message, "rating"))
4414
- writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating);
4415
- if (message.text != null && Object.hasOwnProperty.call(message, "text"))
4416
- $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
4417
- if (message.originalText != null && Object.hasOwnProperty.call(message, "originalText"))
4418
- $root.google.type.LocalizedText.encode(message.originalText, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
4419
- if (message.authorAttribution != null && Object.hasOwnProperty.call(message, "authorAttribution"))
4420
- $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttribution, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
4421
- if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime"))
4422
- $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
4423
- if (message.flagContentUri != null && Object.hasOwnProperty.call(message, "flagContentUri"))
4424
- writer.uint32(/* id 15, wireType 2 =*/122).string(message.flagContentUri);
4425
- if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri"))
4426
- writer.uint32(/* id 16, wireType 2 =*/130).string(message.googleMapsUri);
4427
- if (message.visitDate != null && Object.hasOwnProperty.call(message, "visitDate"))
4428
- $root.google.type.Date.encode(message.visitDate, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
4429
- return writer;
4430
- };
4431
-
4432
- /**
4433
- * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages.
4434
- * @function encodeDelimited
4435
- * @memberof google.maps.places.v1.Review
4436
- * @static
4437
- * @param {google.maps.places.v1.IReview} message Review message or plain object to encode
4438
- * @param {$protobuf.Writer} [writer] Writer to encode to
4439
- * @returns {$protobuf.Writer} Writer
4440
- */
4441
- Review.encodeDelimited = function encodeDelimited(message, writer) {
4442
- return this.encode(message, writer).ldelim();
4443
- };
4444
-
4445
- /**
4446
- * Decodes a Review message from the specified reader or buffer.
4447
- * @function decode
4448
- * @memberof google.maps.places.v1.Review
4449
- * @static
4450
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4451
- * @param {number} [length] Message length if known beforehand
4452
- * @returns {google.maps.places.v1.Review} Review
4453
- * @throws {Error} If the payload is not a reader or valid buffer
4454
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4455
- */
4456
- Review.decode = function decode(reader, length, error) {
4457
- if (!(reader instanceof $Reader))
4458
- reader = $Reader.create(reader);
4459
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Review();
4460
- while (reader.pos < end) {
4461
- var tag = reader.uint32();
4462
- if (tag === error)
4463
- break;
4464
- switch (tag >>> 3) {
4465
- case 1: {
4466
- message.name = reader.string();
4467
- break;
4468
- }
4469
- case 2: {
4470
- message.relativePublishTimeDescription = reader.string();
4471
- break;
4472
- }
4473
- case 9: {
4474
- message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32());
4475
- break;
4476
- }
4477
- case 12: {
4478
- message.originalText = $root.google.type.LocalizedText.decode(reader, reader.uint32());
4479
- break;
4480
- }
4481
- case 7: {
4482
- message.rating = reader.double();
4483
- break;
4484
- }
4485
- case 13: {
4486
- message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32());
4487
- break;
4488
- }
4489
- case 14: {
4490
- message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
4491
- break;
4492
- }
4493
- case 15: {
4494
- message.flagContentUri = reader.string();
4495
- break;
4496
- }
4497
- case 16: {
4498
- message.googleMapsUri = reader.string();
4499
- break;
4500
- }
4501
- case 17: {
4502
- message.visitDate = $root.google.type.Date.decode(reader, reader.uint32());
4503
- break;
4504
- }
4505
- default:
4506
- reader.skipType(tag & 7);
4507
- break;
4508
- }
4509
- }
4510
- return message;
4511
- };
4512
-
4513
- /**
4514
- * Decodes a Review message from the specified reader or buffer, length delimited.
4515
- * @function decodeDelimited
4516
- * @memberof google.maps.places.v1.Review
4517
- * @static
4518
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4519
- * @returns {google.maps.places.v1.Review} Review
4520
- * @throws {Error} If the payload is not a reader or valid buffer
4521
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4522
- */
4523
- Review.decodeDelimited = function decodeDelimited(reader) {
4524
- if (!(reader instanceof $Reader))
4525
- reader = new $Reader(reader);
4526
- return this.decode(reader, reader.uint32());
4527
- };
4528
-
4529
- /**
4530
- * Verifies a Review message.
4531
- * @function verify
4532
- * @memberof google.maps.places.v1.Review
4533
- * @static
4534
- * @param {Object.<string,*>} message Plain object to verify
4535
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
4536
- */
4537
- Review.verify = function verify(message) {
4538
- if (typeof message !== "object" || message === null)
4539
- return "object expected";
4540
- if (message.name != null && message.hasOwnProperty("name"))
4541
- if (!$util.isString(message.name))
4542
- return "name: string expected";
4543
- if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription"))
4544
- if (!$util.isString(message.relativePublishTimeDescription))
4545
- return "relativePublishTimeDescription: string expected";
4546
- if (message.text != null && message.hasOwnProperty("text")) {
4547
- var error = $root.google.type.LocalizedText.verify(message.text);
4548
- if (error)
4549
- return "text." + error;
4550
- }
4551
- if (message.originalText != null && message.hasOwnProperty("originalText")) {
4552
- var error = $root.google.type.LocalizedText.verify(message.originalText);
4553
- if (error)
4554
- return "originalText." + error;
4555
- }
4556
- if (message.rating != null && message.hasOwnProperty("rating"))
4557
- if (typeof message.rating !== "number")
4558
- return "rating: number expected";
4559
- if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) {
4560
- var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttribution);
4561
- if (error)
4562
- return "authorAttribution." + error;
4563
- }
4564
- if (message.publishTime != null && message.hasOwnProperty("publishTime")) {
4565
- var error = $root.google.protobuf.Timestamp.verify(message.publishTime);
4566
- if (error)
4567
- return "publishTime." + error;
4568
- }
4569
- if (message.flagContentUri != null && message.hasOwnProperty("flagContentUri"))
4570
- if (!$util.isString(message.flagContentUri))
4571
- return "flagContentUri: string expected";
4572
- if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri"))
4573
- if (!$util.isString(message.googleMapsUri))
4574
- return "googleMapsUri: string expected";
4575
- if (message.visitDate != null && message.hasOwnProperty("visitDate")) {
4576
- var error = $root.google.type.Date.verify(message.visitDate);
4577
- if (error)
4578
- return "visitDate." + error;
4579
- }
4580
- return null;
4581
- };
4582
-
4583
- /**
4584
- * Creates a Review message from a plain object. Also converts values to their respective internal types.
4585
- * @function fromObject
4586
- * @memberof google.maps.places.v1.Review
4587
- * @static
4588
- * @param {Object.<string,*>} object Plain object
4589
- * @returns {google.maps.places.v1.Review} Review
4590
- */
4591
- Review.fromObject = function fromObject(object) {
4592
- if (object instanceof $root.google.maps.places.v1.Review)
4593
- return object;
4594
- var message = new $root.google.maps.places.v1.Review();
4595
- if (object.name != null)
4596
- message.name = String(object.name);
4597
- if (object.relativePublishTimeDescription != null)
4598
- message.relativePublishTimeDescription = String(object.relativePublishTimeDescription);
4599
- if (object.text != null) {
4600
- if (typeof object.text !== "object")
4601
- throw TypeError(".google.maps.places.v1.Review.text: object expected");
4602
- message.text = $root.google.type.LocalizedText.fromObject(object.text);
4603
- }
4604
- if (object.originalText != null) {
4605
- if (typeof object.originalText !== "object")
4606
- throw TypeError(".google.maps.places.v1.Review.originalText: object expected");
4607
- message.originalText = $root.google.type.LocalizedText.fromObject(object.originalText);
4608
- }
4609
- if (object.rating != null)
4610
- message.rating = Number(object.rating);
4611
- if (object.authorAttribution != null) {
4612
- if (typeof object.authorAttribution !== "object")
4613
- throw TypeError(".google.maps.places.v1.Review.authorAttribution: object expected");
4614
- message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttribution);
4615
- }
4616
- if (object.publishTime != null) {
4617
- if (typeof object.publishTime !== "object")
4618
- throw TypeError(".google.maps.places.v1.Review.publishTime: object expected");
4619
- message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime);
4620
- }
4621
- if (object.flagContentUri != null)
4622
- message.flagContentUri = String(object.flagContentUri);
4623
- if (object.googleMapsUri != null)
4624
- message.googleMapsUri = String(object.googleMapsUri);
4625
- if (object.visitDate != null) {
4626
- if (typeof object.visitDate !== "object")
4627
- throw TypeError(".google.maps.places.v1.Review.visitDate: object expected");
4628
- message.visitDate = $root.google.type.Date.fromObject(object.visitDate);
4629
- }
4630
- return message;
4631
- };
4632
-
4633
- /**
4634
- * Creates a plain object from a Review message. Also converts values to other types if specified.
4635
- * @function toObject
4636
- * @memberof google.maps.places.v1.Review
4637
- * @static
4638
- * @param {google.maps.places.v1.Review} message Review
4639
- * @param {$protobuf.IConversionOptions} [options] Conversion options
4640
- * @returns {Object.<string,*>} Plain object
4641
- */
4642
- Review.toObject = function toObject(message, options) {
4643
- if (!options)
4644
- options = {};
4645
- var object = {};
4646
- if (options.defaults) {
4647
- object.name = "";
4648
- object.relativePublishTimeDescription = "";
4649
- object.rating = 0;
4650
- object.text = null;
4651
- object.originalText = null;
4652
- object.authorAttribution = null;
4653
- object.publishTime = null;
4654
- object.flagContentUri = "";
4655
- object.googleMapsUri = "";
4656
- object.visitDate = null;
4657
- }
4658
- if (message.name != null && message.hasOwnProperty("name"))
4659
- object.name = message.name;
4660
- if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription"))
4661
- object.relativePublishTimeDescription = message.relativePublishTimeDescription;
4662
- if (message.rating != null && message.hasOwnProperty("rating"))
4663
- object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating;
4664
- if (message.text != null && message.hasOwnProperty("text"))
4665
- object.text = $root.google.type.LocalizedText.toObject(message.text, options);
4666
- if (message.originalText != null && message.hasOwnProperty("originalText"))
4667
- object.originalText = $root.google.type.LocalizedText.toObject(message.originalText, options);
4668
- if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution"))
4669
- object.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttribution, options);
4670
- if (message.publishTime != null && message.hasOwnProperty("publishTime"))
4671
- object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options);
4672
- if (message.flagContentUri != null && message.hasOwnProperty("flagContentUri"))
4673
- object.flagContentUri = message.flagContentUri;
4674
- if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri"))
4675
- object.googleMapsUri = message.googleMapsUri;
4676
- if (message.visitDate != null && message.hasOwnProperty("visitDate"))
4677
- object.visitDate = $root.google.type.Date.toObject(message.visitDate, options);
4678
- return object;
4679
- };
4680
-
4681
- /**
4682
- * Converts this Review to JSON.
4683
- * @function toJSON
4684
- * @memberof google.maps.places.v1.Review
4685
- * @instance
4686
- * @returns {Object.<string,*>} JSON object
4687
- */
4688
- Review.prototype.toJSON = function toJSON() {
4689
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4690
- };
4691
-
4692
- /**
4693
- * Gets the default type url for Review
4694
- * @function getTypeUrl
4695
- * @memberof google.maps.places.v1.Review
4696
- * @static
4697
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
4698
- * @returns {string} The default type url
4699
- */
4700
- Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
4701
- if (typeUrlPrefix === undefined) {
4702
- typeUrlPrefix = "type.googleapis.com";
4703
- }
4704
- return typeUrlPrefix + "/google.maps.places.v1.Review";
4705
- };
4706
-
4707
- return Review;
4708
- })();
4709
-
4710
- v1.ContextualContent = (function() {
4711
-
4712
- /**
4713
- * Properties of a ContextualContent.
4714
- * @memberof google.maps.places.v1
4715
- * @interface IContextualContent
4716
- * @property {Array.<google.maps.places.v1.IReview>|null} [reviews] ContextualContent reviews
4717
- * @property {Array.<google.maps.places.v1.IPhoto>|null} [photos] ContextualContent photos
4718
- * @property {Array.<google.maps.places.v1.ContextualContent.IJustification>|null} [justifications] ContextualContent justifications
4719
- */
4720
-
4721
- /**
4722
- * Constructs a new ContextualContent.
4723
- * @memberof google.maps.places.v1
4724
- * @classdesc Represents a ContextualContent.
4725
- * @implements IContextualContent
4726
- * @constructor
4727
- * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set
4728
- */
4729
- function ContextualContent(properties) {
4730
- this.reviews = [];
4731
- this.photos = [];
4732
- this.justifications = [];
4733
- if (properties)
4734
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4735
- if (properties[keys[i]] != null)
4736
- this[keys[i]] = properties[keys[i]];
4737
- }
4738
-
4739
- /**
4740
- * ContextualContent reviews.
4741
- * @member {Array.<google.maps.places.v1.IReview>} reviews
4742
- * @memberof google.maps.places.v1.ContextualContent
4743
- * @instance
4744
- */
4745
- ContextualContent.prototype.reviews = $util.emptyArray;
4746
-
4747
- /**
4748
- * ContextualContent photos.
4749
- * @member {Array.<google.maps.places.v1.IPhoto>} photos
4750
- * @memberof google.maps.places.v1.ContextualContent
4751
- * @instance
4752
- */
4753
- ContextualContent.prototype.photos = $util.emptyArray;
4754
-
4755
- /**
4756
- * ContextualContent justifications.
4757
- * @member {Array.<google.maps.places.v1.ContextualContent.IJustification>} justifications
4758
- * @memberof google.maps.places.v1.ContextualContent
4759
- * @instance
4760
- */
4761
- ContextualContent.prototype.justifications = $util.emptyArray;
4762
-
4763
- /**
4764
- * Creates a new ContextualContent instance using the specified properties.
4765
- * @function create
4766
- * @memberof google.maps.places.v1.ContextualContent
4767
- * @static
4768
- * @param {google.maps.places.v1.IContextualContent=} [properties] Properties to set
4769
- * @returns {google.maps.places.v1.ContextualContent} ContextualContent instance
4770
- */
4771
- ContextualContent.create = function create(properties) {
4772
- return new ContextualContent(properties);
4773
- };
4774
-
4775
- /**
4776
- * Encodes the specified ContextualContent message. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages.
4777
- * @function encode
4778
- * @memberof google.maps.places.v1.ContextualContent
4779
- * @static
4780
- * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode
4781
- * @param {$protobuf.Writer} [writer] Writer to encode to
4782
- * @returns {$protobuf.Writer} Writer
4783
- */
4784
- ContextualContent.encode = function encode(message, writer) {
4785
- if (!writer)
4786
- writer = $Writer.create();
4787
- if (message.reviews != null && message.reviews.length)
4788
- for (var i = 0; i < message.reviews.length; ++i)
4789
- $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
4790
- if (message.photos != null && message.photos.length)
4791
- for (var i = 0; i < message.photos.length; ++i)
4792
- $root.google.maps.places.v1.Photo.encode(message.photos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
4793
- if (message.justifications != null && message.justifications.length)
4794
- for (var i = 0; i < message.justifications.length; ++i)
4795
- $root.google.maps.places.v1.ContextualContent.Justification.encode(message.justifications[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
4796
- return writer;
4797
- };
4798
-
4799
- /**
4800
- * Encodes the specified ContextualContent message, length delimited. Does not implicitly {@link google.maps.places.v1.ContextualContent.verify|verify} messages.
4801
- * @function encodeDelimited
4802
- * @memberof google.maps.places.v1.ContextualContent
4803
- * @static
4804
- * @param {google.maps.places.v1.IContextualContent} message ContextualContent message or plain object to encode
4805
- * @param {$protobuf.Writer} [writer] Writer to encode to
4806
- * @returns {$protobuf.Writer} Writer
4807
- */
4808
- ContextualContent.encodeDelimited = function encodeDelimited(message, writer) {
4809
- return this.encode(message, writer).ldelim();
4810
- };
4811
-
4812
- /**
4813
- * Decodes a ContextualContent message from the specified reader or buffer.
4814
- * @function decode
4815
- * @memberof google.maps.places.v1.ContextualContent
4816
- * @static
4817
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4818
- * @param {number} [length] Message length if known beforehand
4819
- * @returns {google.maps.places.v1.ContextualContent} ContextualContent
4820
- * @throws {Error} If the payload is not a reader or valid buffer
4821
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4822
- */
4823
- ContextualContent.decode = function decode(reader, length, error) {
4824
- if (!(reader instanceof $Reader))
4825
- reader = $Reader.create(reader);
4826
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.ContextualContent();
4827
- while (reader.pos < end) {
4828
- var tag = reader.uint32();
4829
- if (tag === error)
4830
- break;
4831
- switch (tag >>> 3) {
4832
- case 1: {
4833
- if (!(message.reviews && message.reviews.length))
4834
- message.reviews = [];
4835
- message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32()));
4836
- break;
4837
- }
4838
- case 2: {
4839
- if (!(message.photos && message.photos.length))
4840
- message.photos = [];
4841
- message.photos.push($root.google.maps.places.v1.Photo.decode(reader, reader.uint32()));
4842
- break;
4843
- }
4844
- case 3: {
4845
- if (!(message.justifications && message.justifications.length))
4846
- message.justifications = [];
4847
- message.justifications.push($root.google.maps.places.v1.ContextualContent.Justification.decode(reader, reader.uint32()));
4848
- break;
4849
- }
4850
- default:
4851
- reader.skipType(tag & 7);
4852
- break;
4853
- }
4854
- }
4855
- return message;
4856
- };
4857
-
4858
- /**
4859
- * Decodes a ContextualContent message from the specified reader or buffer, length delimited.
4860
- * @function decodeDelimited
4861
- * @memberof google.maps.places.v1.ContextualContent
4862
- * @static
4863
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4864
- * @returns {google.maps.places.v1.ContextualContent} ContextualContent
4865
- * @throws {Error} If the payload is not a reader or valid buffer
4866
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
4867
- */
4868
- ContextualContent.decodeDelimited = function decodeDelimited(reader) {
4869
- if (!(reader instanceof $Reader))
4870
- reader = new $Reader(reader);
4871
- return this.decode(reader, reader.uint32());
4872
- };
4873
-
4874
- /**
4875
- * Verifies a ContextualContent message.
4876
- * @function verify
4877
- * @memberof google.maps.places.v1.ContextualContent
4878
- * @static
4879
- * @param {Object.<string,*>} message Plain object to verify
4880
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
4881
- */
4882
- ContextualContent.verify = function verify(message) {
4883
- if (typeof message !== "object" || message === null)
4884
- return "object expected";
4885
- if (message.reviews != null && message.hasOwnProperty("reviews")) {
4886
- if (!Array.isArray(message.reviews))
4887
- return "reviews: array expected";
4888
- for (var i = 0; i < message.reviews.length; ++i) {
4889
- var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]);
4890
- if (error)
4891
- return "reviews." + error;
4892
- }
4893
- }
4894
- if (message.photos != null && message.hasOwnProperty("photos")) {
4895
- if (!Array.isArray(message.photos))
4896
- return "photos: array expected";
4897
- for (var i = 0; i < message.photos.length; ++i) {
4898
- var error = $root.google.maps.places.v1.Photo.verify(message.photos[i]);
4899
- if (error)
4900
- return "photos." + error;
4901
- }
4902
- }
4903
- if (message.justifications != null && message.hasOwnProperty("justifications")) {
4904
- if (!Array.isArray(message.justifications))
4905
- return "justifications: array expected";
4906
- for (var i = 0; i < message.justifications.length; ++i) {
4907
- var error = $root.google.maps.places.v1.ContextualContent.Justification.verify(message.justifications[i]);
4908
- if (error)
4909
- return "justifications." + error;
4910
- }
4911
- }
4912
- return null;
4913
- };
4914
-
4915
- /**
4916
- * Creates a ContextualContent message from a plain object. Also converts values to their respective internal types.
4917
- * @function fromObject
4918
- * @memberof google.maps.places.v1.ContextualContent
4919
- * @static
4920
- * @param {Object.<string,*>} object Plain object
4921
- * @returns {google.maps.places.v1.ContextualContent} ContextualContent
4922
- */
4923
- ContextualContent.fromObject = function fromObject(object) {
4924
- if (object instanceof $root.google.maps.places.v1.ContextualContent)
4925
- return object;
4926
- var message = new $root.google.maps.places.v1.ContextualContent();
4927
- if (object.reviews) {
4928
- if (!Array.isArray(object.reviews))
4929
- throw TypeError(".google.maps.places.v1.ContextualContent.reviews: array expected");
4930
- message.reviews = [];
4931
- for (var i = 0; i < object.reviews.length; ++i) {
4932
- if (typeof object.reviews[i] !== "object")
4933
- throw TypeError(".google.maps.places.v1.ContextualContent.reviews: object expected");
4934
- message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]);
4935
- }
4936
- }
4937
- if (object.photos) {
4938
- if (!Array.isArray(object.photos))
4939
- throw TypeError(".google.maps.places.v1.ContextualContent.photos: array expected");
4940
- message.photos = [];
4941
- for (var i = 0; i < object.photos.length; ++i) {
4942
- if (typeof object.photos[i] !== "object")
4943
- throw TypeError(".google.maps.places.v1.ContextualContent.photos: object expected");
4944
- message.photos[i] = $root.google.maps.places.v1.Photo.fromObject(object.photos[i]);
4945
- }
4946
- }
4947
- if (object.justifications) {
4948
- if (!Array.isArray(object.justifications))
4949
- throw TypeError(".google.maps.places.v1.ContextualContent.justifications: array expected");
4950
- message.justifications = [];
4951
- for (var i = 0; i < object.justifications.length; ++i) {
4952
- if (typeof object.justifications[i] !== "object")
4953
- throw TypeError(".google.maps.places.v1.ContextualContent.justifications: object expected");
4954
- message.justifications[i] = $root.google.maps.places.v1.ContextualContent.Justification.fromObject(object.justifications[i]);
4955
- }
4956
- }
4957
- return message;
4958
- };
4959
-
4960
- /**
4961
- * Creates a plain object from a ContextualContent message. Also converts values to other types if specified.
4962
- * @function toObject
4963
- * @memberof google.maps.places.v1.ContextualContent
4964
- * @static
4965
- * @param {google.maps.places.v1.ContextualContent} message ContextualContent
4966
- * @param {$protobuf.IConversionOptions} [options] Conversion options
4967
- * @returns {Object.<string,*>} Plain object
4968
- */
4969
- ContextualContent.toObject = function toObject(message, options) {
4970
- if (!options)
4971
- options = {};
4972
- var object = {};
4973
- if (options.arrays || options.defaults) {
4974
- object.reviews = [];
4975
- object.photos = [];
4976
- object.justifications = [];
4977
- }
4978
- if (message.reviews && message.reviews.length) {
4979
- object.reviews = [];
4980
- for (var j = 0; j < message.reviews.length; ++j)
4981
- object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options);
4982
- }
4983
- if (message.photos && message.photos.length) {
4984
- object.photos = [];
4985
- for (var j = 0; j < message.photos.length; ++j)
4986
- object.photos[j] = $root.google.maps.places.v1.Photo.toObject(message.photos[j], options);
4987
- }
4988
- if (message.justifications && message.justifications.length) {
4989
- object.justifications = [];
4990
- for (var j = 0; j < message.justifications.length; ++j)
4991
- object.justifications[j] = $root.google.maps.places.v1.ContextualContent.Justification.toObject(message.justifications[j], options);
4992
- }
4993
- return object;
4994
- };
4995
-
4996
- /**
4997
- * Converts this ContextualContent to JSON.
4998
- * @function toJSON
4999
- * @memberof google.maps.places.v1.ContextualContent
5000
- * @instance
5001
- * @returns {Object.<string,*>} JSON object
5002
- */
5003
- ContextualContent.prototype.toJSON = function toJSON() {
5004
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5005
- };
5006
-
5007
- /**
5008
- * Gets the default type url for ContextualContent
5009
- * @function getTypeUrl
5010
- * @memberof google.maps.places.v1.ContextualContent
5011
- * @static
5012
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
5013
- * @returns {string} The default type url
5014
- */
5015
- ContextualContent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5016
- if (typeUrlPrefix === undefined) {
5017
- typeUrlPrefix = "type.googleapis.com";
5018
- }
5019
- return typeUrlPrefix + "/google.maps.places.v1.ContextualContent";
5020
- };
5021
-
5022
- ContextualContent.Justification = (function() {
5023
-
5024
- /**
5025
- * Properties of a Justification.
5026
- * @memberof google.maps.places.v1.ContextualContent
5027
- * @interface IJustification
5028
- * @property {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null} [reviewJustification] Justification reviewJustification
5029
- * @property {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null} [businessAvailabilityAttributesJustification] Justification businessAvailabilityAttributesJustification
5030
- */
4308
+ /**
4309
+ * Properties of a Justification.
4310
+ * @memberof google.maps.places.v1.ContextualContent
4311
+ * @interface IJustification
4312
+ * @property {google.maps.places.v1.ContextualContent.Justification.IReviewJustification|null} [reviewJustification] Justification reviewJustification
4313
+ * @property {google.maps.places.v1.ContextualContent.Justification.IBusinessAvailabilityAttributesJustification|null} [businessAvailabilityAttributesJustification] Justification businessAvailabilityAttributesJustification
4314
+ */
5031
4315
 
5032
4316
  /**
5033
4317
  * Constructs a new Justification.
@@ -6221,65 +5505,411 @@
6221
5505
  return object;
6222
5506
  };
6223
5507
 
6224
- /**
6225
- * Converts this BusinessAvailabilityAttributesJustification to JSON.
6226
- * @function toJSON
6227
- * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification
6228
- * @instance
6229
- * @returns {Object.<string,*>} JSON object
6230
- */
6231
- BusinessAvailabilityAttributesJustification.prototype.toJSON = function toJSON() {
6232
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6233
- };
5508
+ /**
5509
+ * Converts this BusinessAvailabilityAttributesJustification to JSON.
5510
+ * @function toJSON
5511
+ * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification
5512
+ * @instance
5513
+ * @returns {Object.<string,*>} JSON object
5514
+ */
5515
+ BusinessAvailabilityAttributesJustification.prototype.toJSON = function toJSON() {
5516
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5517
+ };
5518
+
5519
+ /**
5520
+ * Gets the default type url for BusinessAvailabilityAttributesJustification
5521
+ * @function getTypeUrl
5522
+ * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification
5523
+ * @static
5524
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
5525
+ * @returns {string} The default type url
5526
+ */
5527
+ BusinessAvailabilityAttributesJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5528
+ if (typeUrlPrefix === undefined) {
5529
+ typeUrlPrefix = "type.googleapis.com";
5530
+ }
5531
+ return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification";
5532
+ };
5533
+
5534
+ return BusinessAvailabilityAttributesJustification;
5535
+ })();
5536
+
5537
+ return Justification;
5538
+ })();
5539
+
5540
+ return ContextualContent;
5541
+ })();
5542
+
5543
+ v1.Photo = (function() {
5544
+
5545
+ /**
5546
+ * Properties of a Photo.
5547
+ * @memberof google.maps.places.v1
5548
+ * @interface IPhoto
5549
+ * @property {string|null} [name] Photo name
5550
+ * @property {number|null} [widthPx] Photo widthPx
5551
+ * @property {number|null} [heightPx] Photo heightPx
5552
+ * @property {Array.<google.maps.places.v1.IAuthorAttribution>|null} [authorAttributions] Photo authorAttributions
5553
+ * @property {string|null} [flagContentUri] Photo flagContentUri
5554
+ * @property {string|null} [googleMapsUri] Photo googleMapsUri
5555
+ */
5556
+
5557
+ /**
5558
+ * Constructs a new Photo.
5559
+ * @memberof google.maps.places.v1
5560
+ * @classdesc Represents a Photo.
5561
+ * @implements IPhoto
5562
+ * @constructor
5563
+ * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set
5564
+ */
5565
+ function Photo(properties) {
5566
+ this.authorAttributions = [];
5567
+ if (properties)
5568
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
5569
+ if (properties[keys[i]] != null)
5570
+ this[keys[i]] = properties[keys[i]];
5571
+ }
5572
+
5573
+ /**
5574
+ * Photo name.
5575
+ * @member {string} name
5576
+ * @memberof google.maps.places.v1.Photo
5577
+ * @instance
5578
+ */
5579
+ Photo.prototype.name = "";
5580
+
5581
+ /**
5582
+ * Photo widthPx.
5583
+ * @member {number} widthPx
5584
+ * @memberof google.maps.places.v1.Photo
5585
+ * @instance
5586
+ */
5587
+ Photo.prototype.widthPx = 0;
5588
+
5589
+ /**
5590
+ * Photo heightPx.
5591
+ * @member {number} heightPx
5592
+ * @memberof google.maps.places.v1.Photo
5593
+ * @instance
5594
+ */
5595
+ Photo.prototype.heightPx = 0;
5596
+
5597
+ /**
5598
+ * Photo authorAttributions.
5599
+ * @member {Array.<google.maps.places.v1.IAuthorAttribution>} authorAttributions
5600
+ * @memberof google.maps.places.v1.Photo
5601
+ * @instance
5602
+ */
5603
+ Photo.prototype.authorAttributions = $util.emptyArray;
5604
+
5605
+ /**
5606
+ * Photo flagContentUri.
5607
+ * @member {string} flagContentUri
5608
+ * @memberof google.maps.places.v1.Photo
5609
+ * @instance
5610
+ */
5611
+ Photo.prototype.flagContentUri = "";
5612
+
5613
+ /**
5614
+ * Photo googleMapsUri.
5615
+ * @member {string} googleMapsUri
5616
+ * @memberof google.maps.places.v1.Photo
5617
+ * @instance
5618
+ */
5619
+ Photo.prototype.googleMapsUri = "";
5620
+
5621
+ /**
5622
+ * Creates a new Photo instance using the specified properties.
5623
+ * @function create
5624
+ * @memberof google.maps.places.v1.Photo
5625
+ * @static
5626
+ * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set
5627
+ * @returns {google.maps.places.v1.Photo} Photo instance
5628
+ */
5629
+ Photo.create = function create(properties) {
5630
+ return new Photo(properties);
5631
+ };
5632
+
5633
+ /**
5634
+ * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages.
5635
+ * @function encode
5636
+ * @memberof google.maps.places.v1.Photo
5637
+ * @static
5638
+ * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode
5639
+ * @param {$protobuf.Writer} [writer] Writer to encode to
5640
+ * @returns {$protobuf.Writer} Writer
5641
+ */
5642
+ Photo.encode = function encode(message, writer) {
5643
+ if (!writer)
5644
+ writer = $Writer.create();
5645
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
5646
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
5647
+ if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx"))
5648
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.widthPx);
5649
+ if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx"))
5650
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.heightPx);
5651
+ if (message.authorAttributions != null && message.authorAttributions.length)
5652
+ for (var i = 0; i < message.authorAttributions.length; ++i)
5653
+ $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttributions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
5654
+ if (message.flagContentUri != null && Object.hasOwnProperty.call(message, "flagContentUri"))
5655
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.flagContentUri);
5656
+ if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri"))
5657
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.googleMapsUri);
5658
+ return writer;
5659
+ };
5660
+
5661
+ /**
5662
+ * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages.
5663
+ * @function encodeDelimited
5664
+ * @memberof google.maps.places.v1.Photo
5665
+ * @static
5666
+ * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode
5667
+ * @param {$protobuf.Writer} [writer] Writer to encode to
5668
+ * @returns {$protobuf.Writer} Writer
5669
+ */
5670
+ Photo.encodeDelimited = function encodeDelimited(message, writer) {
5671
+ return this.encode(message, writer).ldelim();
5672
+ };
5673
+
5674
+ /**
5675
+ * Decodes a Photo message from the specified reader or buffer.
5676
+ * @function decode
5677
+ * @memberof google.maps.places.v1.Photo
5678
+ * @static
5679
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5680
+ * @param {number} [length] Message length if known beforehand
5681
+ * @returns {google.maps.places.v1.Photo} Photo
5682
+ * @throws {Error} If the payload is not a reader or valid buffer
5683
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5684
+ */
5685
+ Photo.decode = function decode(reader, length, error) {
5686
+ if (!(reader instanceof $Reader))
5687
+ reader = $Reader.create(reader);
5688
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Photo();
5689
+ while (reader.pos < end) {
5690
+ var tag = reader.uint32();
5691
+ if (tag === error)
5692
+ break;
5693
+ switch (tag >>> 3) {
5694
+ case 1: {
5695
+ message.name = reader.string();
5696
+ break;
5697
+ }
5698
+ case 2: {
5699
+ message.widthPx = reader.int32();
5700
+ break;
5701
+ }
5702
+ case 3: {
5703
+ message.heightPx = reader.int32();
5704
+ break;
5705
+ }
5706
+ case 4: {
5707
+ if (!(message.authorAttributions && message.authorAttributions.length))
5708
+ message.authorAttributions = [];
5709
+ message.authorAttributions.push($root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32()));
5710
+ break;
5711
+ }
5712
+ case 5: {
5713
+ message.flagContentUri = reader.string();
5714
+ break;
5715
+ }
5716
+ case 6: {
5717
+ message.googleMapsUri = reader.string();
5718
+ break;
5719
+ }
5720
+ default:
5721
+ reader.skipType(tag & 7);
5722
+ break;
5723
+ }
5724
+ }
5725
+ return message;
5726
+ };
5727
+
5728
+ /**
5729
+ * Decodes a Photo message from the specified reader or buffer, length delimited.
5730
+ * @function decodeDelimited
5731
+ * @memberof google.maps.places.v1.Photo
5732
+ * @static
5733
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
5734
+ * @returns {google.maps.places.v1.Photo} Photo
5735
+ * @throws {Error} If the payload is not a reader or valid buffer
5736
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5737
+ */
5738
+ Photo.decodeDelimited = function decodeDelimited(reader) {
5739
+ if (!(reader instanceof $Reader))
5740
+ reader = new $Reader(reader);
5741
+ return this.decode(reader, reader.uint32());
5742
+ };
5743
+
5744
+ /**
5745
+ * Verifies a Photo message.
5746
+ * @function verify
5747
+ * @memberof google.maps.places.v1.Photo
5748
+ * @static
5749
+ * @param {Object.<string,*>} message Plain object to verify
5750
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
5751
+ */
5752
+ Photo.verify = function verify(message) {
5753
+ if (typeof message !== "object" || message === null)
5754
+ return "object expected";
5755
+ if (message.name != null && message.hasOwnProperty("name"))
5756
+ if (!$util.isString(message.name))
5757
+ return "name: string expected";
5758
+ if (message.widthPx != null && message.hasOwnProperty("widthPx"))
5759
+ if (!$util.isInteger(message.widthPx))
5760
+ return "widthPx: integer expected";
5761
+ if (message.heightPx != null && message.hasOwnProperty("heightPx"))
5762
+ if (!$util.isInteger(message.heightPx))
5763
+ return "heightPx: integer expected";
5764
+ if (message.authorAttributions != null && message.hasOwnProperty("authorAttributions")) {
5765
+ if (!Array.isArray(message.authorAttributions))
5766
+ return "authorAttributions: array expected";
5767
+ for (var i = 0; i < message.authorAttributions.length; ++i) {
5768
+ var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttributions[i]);
5769
+ if (error)
5770
+ return "authorAttributions." + error;
5771
+ }
5772
+ }
5773
+ if (message.flagContentUri != null && message.hasOwnProperty("flagContentUri"))
5774
+ if (!$util.isString(message.flagContentUri))
5775
+ return "flagContentUri: string expected";
5776
+ if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri"))
5777
+ if (!$util.isString(message.googleMapsUri))
5778
+ return "googleMapsUri: string expected";
5779
+ return null;
5780
+ };
5781
+
5782
+ /**
5783
+ * Creates a Photo message from a plain object. Also converts values to their respective internal types.
5784
+ * @function fromObject
5785
+ * @memberof google.maps.places.v1.Photo
5786
+ * @static
5787
+ * @param {Object.<string,*>} object Plain object
5788
+ * @returns {google.maps.places.v1.Photo} Photo
5789
+ */
5790
+ Photo.fromObject = function fromObject(object) {
5791
+ if (object instanceof $root.google.maps.places.v1.Photo)
5792
+ return object;
5793
+ var message = new $root.google.maps.places.v1.Photo();
5794
+ if (object.name != null)
5795
+ message.name = String(object.name);
5796
+ if (object.widthPx != null)
5797
+ message.widthPx = object.widthPx | 0;
5798
+ if (object.heightPx != null)
5799
+ message.heightPx = object.heightPx | 0;
5800
+ if (object.authorAttributions) {
5801
+ if (!Array.isArray(object.authorAttributions))
5802
+ throw TypeError(".google.maps.places.v1.Photo.authorAttributions: array expected");
5803
+ message.authorAttributions = [];
5804
+ for (var i = 0; i < object.authorAttributions.length; ++i) {
5805
+ if (typeof object.authorAttributions[i] !== "object")
5806
+ throw TypeError(".google.maps.places.v1.Photo.authorAttributions: object expected");
5807
+ message.authorAttributions[i] = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttributions[i]);
5808
+ }
5809
+ }
5810
+ if (object.flagContentUri != null)
5811
+ message.flagContentUri = String(object.flagContentUri);
5812
+ if (object.googleMapsUri != null)
5813
+ message.googleMapsUri = String(object.googleMapsUri);
5814
+ return message;
5815
+ };
6234
5816
 
6235
- /**
6236
- * Gets the default type url for BusinessAvailabilityAttributesJustification
6237
- * @function getTypeUrl
6238
- * @memberof google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification
6239
- * @static
6240
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
6241
- * @returns {string} The default type url
6242
- */
6243
- BusinessAvailabilityAttributesJustification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6244
- if (typeUrlPrefix === undefined) {
6245
- typeUrlPrefix = "type.googleapis.com";
6246
- }
6247
- return typeUrlPrefix + "/google.maps.places.v1.ContextualContent.Justification.BusinessAvailabilityAttributesJustification";
6248
- };
5817
+ /**
5818
+ * Creates a plain object from a Photo message. Also converts values to other types if specified.
5819
+ * @function toObject
5820
+ * @memberof google.maps.places.v1.Photo
5821
+ * @static
5822
+ * @param {google.maps.places.v1.Photo} message Photo
5823
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
5824
+ * @returns {Object.<string,*>} Plain object
5825
+ */
5826
+ Photo.toObject = function toObject(message, options) {
5827
+ if (!options)
5828
+ options = {};
5829
+ var object = {};
5830
+ if (options.arrays || options.defaults)
5831
+ object.authorAttributions = [];
5832
+ if (options.defaults) {
5833
+ object.name = "";
5834
+ object.widthPx = 0;
5835
+ object.heightPx = 0;
5836
+ object.flagContentUri = "";
5837
+ object.googleMapsUri = "";
5838
+ }
5839
+ if (message.name != null && message.hasOwnProperty("name"))
5840
+ object.name = message.name;
5841
+ if (message.widthPx != null && message.hasOwnProperty("widthPx"))
5842
+ object.widthPx = message.widthPx;
5843
+ if (message.heightPx != null && message.hasOwnProperty("heightPx"))
5844
+ object.heightPx = message.heightPx;
5845
+ if (message.authorAttributions && message.authorAttributions.length) {
5846
+ object.authorAttributions = [];
5847
+ for (var j = 0; j < message.authorAttributions.length; ++j)
5848
+ object.authorAttributions[j] = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttributions[j], options);
5849
+ }
5850
+ if (message.flagContentUri != null && message.hasOwnProperty("flagContentUri"))
5851
+ object.flagContentUri = message.flagContentUri;
5852
+ if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri"))
5853
+ object.googleMapsUri = message.googleMapsUri;
5854
+ return object;
5855
+ };
6249
5856
 
6250
- return BusinessAvailabilityAttributesJustification;
6251
- })();
5857
+ /**
5858
+ * Converts this Photo to JSON.
5859
+ * @function toJSON
5860
+ * @memberof google.maps.places.v1.Photo
5861
+ * @instance
5862
+ * @returns {Object.<string,*>} JSON object
5863
+ */
5864
+ Photo.prototype.toJSON = function toJSON() {
5865
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
5866
+ };
6252
5867
 
6253
- return Justification;
6254
- })();
5868
+ /**
5869
+ * Gets the default type url for Photo
5870
+ * @function getTypeUrl
5871
+ * @memberof google.maps.places.v1.Photo
5872
+ * @static
5873
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
5874
+ * @returns {string} The default type url
5875
+ */
5876
+ Photo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
5877
+ if (typeUrlPrefix === undefined) {
5878
+ typeUrlPrefix = "type.googleapis.com";
5879
+ }
5880
+ return typeUrlPrefix + "/google.maps.places.v1.Photo";
5881
+ };
6255
5882
 
6256
- return ContextualContent;
5883
+ return Photo;
6257
5884
  })();
6258
5885
 
6259
- v1.Photo = (function() {
5886
+ v1.Review = (function() {
6260
5887
 
6261
5888
  /**
6262
- * Properties of a Photo.
5889
+ * Properties of a Review.
6263
5890
  * @memberof google.maps.places.v1
6264
- * @interface IPhoto
6265
- * @property {string|null} [name] Photo name
6266
- * @property {number|null} [widthPx] Photo widthPx
6267
- * @property {number|null} [heightPx] Photo heightPx
6268
- * @property {Array.<google.maps.places.v1.IAuthorAttribution>|null} [authorAttributions] Photo authorAttributions
6269
- * @property {string|null} [flagContentUri] Photo flagContentUri
6270
- * @property {string|null} [googleMapsUri] Photo googleMapsUri
5891
+ * @interface IReview
5892
+ * @property {string|null} [name] Review name
5893
+ * @property {string|null} [relativePublishTimeDescription] Review relativePublishTimeDescription
5894
+ * @property {google.type.ILocalizedText|null} [text] Review text
5895
+ * @property {google.type.ILocalizedText|null} [originalText] Review originalText
5896
+ * @property {number|null} [rating] Review rating
5897
+ * @property {google.maps.places.v1.IAuthorAttribution|null} [authorAttribution] Review authorAttribution
5898
+ * @property {google.protobuf.ITimestamp|null} [publishTime] Review publishTime
5899
+ * @property {string|null} [flagContentUri] Review flagContentUri
5900
+ * @property {string|null} [googleMapsUri] Review googleMapsUri
5901
+ * @property {google.type.IDate|null} [visitDate] Review visitDate
6271
5902
  */
6272
5903
 
6273
5904
  /**
6274
- * Constructs a new Photo.
5905
+ * Constructs a new Review.
6275
5906
  * @memberof google.maps.places.v1
6276
- * @classdesc Represents a Photo.
6277
- * @implements IPhoto
5907
+ * @classdesc Represents a Review.
5908
+ * @implements IReview
6278
5909
  * @constructor
6279
- * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set
5910
+ * @param {google.maps.places.v1.IReview=} [properties] Properties to set
6280
5911
  */
6281
- function Photo(properties) {
6282
- this.authorAttributions = [];
5912
+ function Review(properties) {
6283
5913
  if (properties)
6284
5914
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
6285
5915
  if (properties[keys[i]] != null)
@@ -6287,121 +5917,160 @@
6287
5917
  }
6288
5918
 
6289
5919
  /**
6290
- * Photo name.
5920
+ * Review name.
6291
5921
  * @member {string} name
6292
- * @memberof google.maps.places.v1.Photo
5922
+ * @memberof google.maps.places.v1.Review
6293
5923
  * @instance
6294
5924
  */
6295
- Photo.prototype.name = "";
5925
+ Review.prototype.name = "";
6296
5926
 
6297
5927
  /**
6298
- * Photo widthPx.
6299
- * @member {number} widthPx
6300
- * @memberof google.maps.places.v1.Photo
5928
+ * Review relativePublishTimeDescription.
5929
+ * @member {string} relativePublishTimeDescription
5930
+ * @memberof google.maps.places.v1.Review
6301
5931
  * @instance
6302
5932
  */
6303
- Photo.prototype.widthPx = 0;
5933
+ Review.prototype.relativePublishTimeDescription = "";
6304
5934
 
6305
5935
  /**
6306
- * Photo heightPx.
6307
- * @member {number} heightPx
6308
- * @memberof google.maps.places.v1.Photo
5936
+ * Review text.
5937
+ * @member {google.type.ILocalizedText|null|undefined} text
5938
+ * @memberof google.maps.places.v1.Review
6309
5939
  * @instance
6310
5940
  */
6311
- Photo.prototype.heightPx = 0;
5941
+ Review.prototype.text = null;
6312
5942
 
6313
5943
  /**
6314
- * Photo authorAttributions.
6315
- * @member {Array.<google.maps.places.v1.IAuthorAttribution>} authorAttributions
6316
- * @memberof google.maps.places.v1.Photo
5944
+ * Review originalText.
5945
+ * @member {google.type.ILocalizedText|null|undefined} originalText
5946
+ * @memberof google.maps.places.v1.Review
6317
5947
  * @instance
6318
5948
  */
6319
- Photo.prototype.authorAttributions = $util.emptyArray;
5949
+ Review.prototype.originalText = null;
6320
5950
 
6321
5951
  /**
6322
- * Photo flagContentUri.
5952
+ * Review rating.
5953
+ * @member {number} rating
5954
+ * @memberof google.maps.places.v1.Review
5955
+ * @instance
5956
+ */
5957
+ Review.prototype.rating = 0;
5958
+
5959
+ /**
5960
+ * Review authorAttribution.
5961
+ * @member {google.maps.places.v1.IAuthorAttribution|null|undefined} authorAttribution
5962
+ * @memberof google.maps.places.v1.Review
5963
+ * @instance
5964
+ */
5965
+ Review.prototype.authorAttribution = null;
5966
+
5967
+ /**
5968
+ * Review publishTime.
5969
+ * @member {google.protobuf.ITimestamp|null|undefined} publishTime
5970
+ * @memberof google.maps.places.v1.Review
5971
+ * @instance
5972
+ */
5973
+ Review.prototype.publishTime = null;
5974
+
5975
+ /**
5976
+ * Review flagContentUri.
6323
5977
  * @member {string} flagContentUri
6324
- * @memberof google.maps.places.v1.Photo
5978
+ * @memberof google.maps.places.v1.Review
6325
5979
  * @instance
6326
5980
  */
6327
- Photo.prototype.flagContentUri = "";
5981
+ Review.prototype.flagContentUri = "";
6328
5982
 
6329
5983
  /**
6330
- * Photo googleMapsUri.
5984
+ * Review googleMapsUri.
6331
5985
  * @member {string} googleMapsUri
6332
- * @memberof google.maps.places.v1.Photo
5986
+ * @memberof google.maps.places.v1.Review
6333
5987
  * @instance
6334
5988
  */
6335
- Photo.prototype.googleMapsUri = "";
5989
+ Review.prototype.googleMapsUri = "";
6336
5990
 
6337
5991
  /**
6338
- * Creates a new Photo instance using the specified properties.
5992
+ * Review visitDate.
5993
+ * @member {google.type.IDate|null|undefined} visitDate
5994
+ * @memberof google.maps.places.v1.Review
5995
+ * @instance
5996
+ */
5997
+ Review.prototype.visitDate = null;
5998
+
5999
+ /**
6000
+ * Creates a new Review instance using the specified properties.
6339
6001
  * @function create
6340
- * @memberof google.maps.places.v1.Photo
6002
+ * @memberof google.maps.places.v1.Review
6341
6003
  * @static
6342
- * @param {google.maps.places.v1.IPhoto=} [properties] Properties to set
6343
- * @returns {google.maps.places.v1.Photo} Photo instance
6004
+ * @param {google.maps.places.v1.IReview=} [properties] Properties to set
6005
+ * @returns {google.maps.places.v1.Review} Review instance
6344
6006
  */
6345
- Photo.create = function create(properties) {
6346
- return new Photo(properties);
6007
+ Review.create = function create(properties) {
6008
+ return new Review(properties);
6347
6009
  };
6348
6010
 
6349
6011
  /**
6350
- * Encodes the specified Photo message. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages.
6012
+ * Encodes the specified Review message. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages.
6351
6013
  * @function encode
6352
- * @memberof google.maps.places.v1.Photo
6014
+ * @memberof google.maps.places.v1.Review
6353
6015
  * @static
6354
- * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode
6016
+ * @param {google.maps.places.v1.IReview} message Review message or plain object to encode
6355
6017
  * @param {$protobuf.Writer} [writer] Writer to encode to
6356
6018
  * @returns {$protobuf.Writer} Writer
6357
6019
  */
6358
- Photo.encode = function encode(message, writer) {
6020
+ Review.encode = function encode(message, writer) {
6359
6021
  if (!writer)
6360
6022
  writer = $Writer.create();
6361
6023
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
6362
6024
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
6363
- if (message.widthPx != null && Object.hasOwnProperty.call(message, "widthPx"))
6364
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.widthPx);
6365
- if (message.heightPx != null && Object.hasOwnProperty.call(message, "heightPx"))
6366
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.heightPx);
6367
- if (message.authorAttributions != null && message.authorAttributions.length)
6368
- for (var i = 0; i < message.authorAttributions.length; ++i)
6369
- $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttributions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
6025
+ if (message.relativePublishTimeDescription != null && Object.hasOwnProperty.call(message, "relativePublishTimeDescription"))
6026
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.relativePublishTimeDescription);
6027
+ if (message.rating != null && Object.hasOwnProperty.call(message, "rating"))
6028
+ writer.uint32(/* id 7, wireType 1 =*/57).double(message.rating);
6029
+ if (message.text != null && Object.hasOwnProperty.call(message, "text"))
6030
+ $root.google.type.LocalizedText.encode(message.text, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
6031
+ if (message.originalText != null && Object.hasOwnProperty.call(message, "originalText"))
6032
+ $root.google.type.LocalizedText.encode(message.originalText, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
6033
+ if (message.authorAttribution != null && Object.hasOwnProperty.call(message, "authorAttribution"))
6034
+ $root.google.maps.places.v1.AuthorAttribution.encode(message.authorAttribution, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
6035
+ if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime"))
6036
+ $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
6370
6037
  if (message.flagContentUri != null && Object.hasOwnProperty.call(message, "flagContentUri"))
6371
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.flagContentUri);
6038
+ writer.uint32(/* id 15, wireType 2 =*/122).string(message.flagContentUri);
6372
6039
  if (message.googleMapsUri != null && Object.hasOwnProperty.call(message, "googleMapsUri"))
6373
- writer.uint32(/* id 6, wireType 2 =*/50).string(message.googleMapsUri);
6040
+ writer.uint32(/* id 16, wireType 2 =*/130).string(message.googleMapsUri);
6041
+ if (message.visitDate != null && Object.hasOwnProperty.call(message, "visitDate"))
6042
+ $root.google.type.Date.encode(message.visitDate, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
6374
6043
  return writer;
6375
6044
  };
6376
6045
 
6377
6046
  /**
6378
- * Encodes the specified Photo message, length delimited. Does not implicitly {@link google.maps.places.v1.Photo.verify|verify} messages.
6047
+ * Encodes the specified Review message, length delimited. Does not implicitly {@link google.maps.places.v1.Review.verify|verify} messages.
6379
6048
  * @function encodeDelimited
6380
- * @memberof google.maps.places.v1.Photo
6049
+ * @memberof google.maps.places.v1.Review
6381
6050
  * @static
6382
- * @param {google.maps.places.v1.IPhoto} message Photo message or plain object to encode
6051
+ * @param {google.maps.places.v1.IReview} message Review message or plain object to encode
6383
6052
  * @param {$protobuf.Writer} [writer] Writer to encode to
6384
6053
  * @returns {$protobuf.Writer} Writer
6385
6054
  */
6386
- Photo.encodeDelimited = function encodeDelimited(message, writer) {
6055
+ Review.encodeDelimited = function encodeDelimited(message, writer) {
6387
6056
  return this.encode(message, writer).ldelim();
6388
6057
  };
6389
6058
 
6390
6059
  /**
6391
- * Decodes a Photo message from the specified reader or buffer.
6060
+ * Decodes a Review message from the specified reader or buffer.
6392
6061
  * @function decode
6393
- * @memberof google.maps.places.v1.Photo
6062
+ * @memberof google.maps.places.v1.Review
6394
6063
  * @static
6395
6064
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6396
6065
  * @param {number} [length] Message length if known beforehand
6397
- * @returns {google.maps.places.v1.Photo} Photo
6066
+ * @returns {google.maps.places.v1.Review} Review
6398
6067
  * @throws {Error} If the payload is not a reader or valid buffer
6399
6068
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
6400
6069
  */
6401
- Photo.decode = function decode(reader, length, error) {
6070
+ Review.decode = function decode(reader, length, error) {
6402
6071
  if (!(reader instanceof $Reader))
6403
6072
  reader = $Reader.create(reader);
6404
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Photo();
6073
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Review();
6405
6074
  while (reader.pos < end) {
6406
6075
  var tag = reader.uint32();
6407
6076
  if (tag === error)
@@ -6412,27 +6081,41 @@
6412
6081
  break;
6413
6082
  }
6414
6083
  case 2: {
6415
- message.widthPx = reader.int32();
6084
+ message.relativePublishTimeDescription = reader.string();
6416
6085
  break;
6417
6086
  }
6418
- case 3: {
6419
- message.heightPx = reader.int32();
6087
+ case 9: {
6088
+ message.text = $root.google.type.LocalizedText.decode(reader, reader.uint32());
6420
6089
  break;
6421
6090
  }
6422
- case 4: {
6423
- if (!(message.authorAttributions && message.authorAttributions.length))
6424
- message.authorAttributions = [];
6425
- message.authorAttributions.push($root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32()));
6091
+ case 12: {
6092
+ message.originalText = $root.google.type.LocalizedText.decode(reader, reader.uint32());
6426
6093
  break;
6427
6094
  }
6428
- case 5: {
6095
+ case 7: {
6096
+ message.rating = reader.double();
6097
+ break;
6098
+ }
6099
+ case 13: {
6100
+ message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.decode(reader, reader.uint32());
6101
+ break;
6102
+ }
6103
+ case 14: {
6104
+ message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
6105
+ break;
6106
+ }
6107
+ case 15: {
6429
6108
  message.flagContentUri = reader.string();
6430
6109
  break;
6431
6110
  }
6432
- case 6: {
6111
+ case 16: {
6433
6112
  message.googleMapsUri = reader.string();
6434
6113
  break;
6435
6114
  }
6115
+ case 17: {
6116
+ message.visitDate = $root.google.type.Date.decode(reader, reader.uint32());
6117
+ break;
6118
+ }
6436
6119
  default:
6437
6120
  reader.skipType(tag & 7);
6438
6121
  break;
@@ -6442,49 +6125,60 @@
6442
6125
  };
6443
6126
 
6444
6127
  /**
6445
- * Decodes a Photo message from the specified reader or buffer, length delimited.
6128
+ * Decodes a Review message from the specified reader or buffer, length delimited.
6446
6129
  * @function decodeDelimited
6447
- * @memberof google.maps.places.v1.Photo
6130
+ * @memberof google.maps.places.v1.Review
6448
6131
  * @static
6449
6132
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
6450
- * @returns {google.maps.places.v1.Photo} Photo
6133
+ * @returns {google.maps.places.v1.Review} Review
6451
6134
  * @throws {Error} If the payload is not a reader or valid buffer
6452
6135
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
6453
6136
  */
6454
- Photo.decodeDelimited = function decodeDelimited(reader) {
6137
+ Review.decodeDelimited = function decodeDelimited(reader) {
6455
6138
  if (!(reader instanceof $Reader))
6456
6139
  reader = new $Reader(reader);
6457
6140
  return this.decode(reader, reader.uint32());
6458
6141
  };
6459
6142
 
6460
6143
  /**
6461
- * Verifies a Photo message.
6144
+ * Verifies a Review message.
6462
6145
  * @function verify
6463
- * @memberof google.maps.places.v1.Photo
6146
+ * @memberof google.maps.places.v1.Review
6464
6147
  * @static
6465
6148
  * @param {Object.<string,*>} message Plain object to verify
6466
6149
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
6467
6150
  */
6468
- Photo.verify = function verify(message) {
6151
+ Review.verify = function verify(message) {
6469
6152
  if (typeof message !== "object" || message === null)
6470
6153
  return "object expected";
6471
6154
  if (message.name != null && message.hasOwnProperty("name"))
6472
6155
  if (!$util.isString(message.name))
6473
6156
  return "name: string expected";
6474
- if (message.widthPx != null && message.hasOwnProperty("widthPx"))
6475
- if (!$util.isInteger(message.widthPx))
6476
- return "widthPx: integer expected";
6477
- if (message.heightPx != null && message.hasOwnProperty("heightPx"))
6478
- if (!$util.isInteger(message.heightPx))
6479
- return "heightPx: integer expected";
6480
- if (message.authorAttributions != null && message.hasOwnProperty("authorAttributions")) {
6481
- if (!Array.isArray(message.authorAttributions))
6482
- return "authorAttributions: array expected";
6483
- for (var i = 0; i < message.authorAttributions.length; ++i) {
6484
- var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttributions[i]);
6485
- if (error)
6486
- return "authorAttributions." + error;
6487
- }
6157
+ if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription"))
6158
+ if (!$util.isString(message.relativePublishTimeDescription))
6159
+ return "relativePublishTimeDescription: string expected";
6160
+ if (message.text != null && message.hasOwnProperty("text")) {
6161
+ var error = $root.google.type.LocalizedText.verify(message.text);
6162
+ if (error)
6163
+ return "text." + error;
6164
+ }
6165
+ if (message.originalText != null && message.hasOwnProperty("originalText")) {
6166
+ var error = $root.google.type.LocalizedText.verify(message.originalText);
6167
+ if (error)
6168
+ return "originalText." + error;
6169
+ }
6170
+ if (message.rating != null && message.hasOwnProperty("rating"))
6171
+ if (typeof message.rating !== "number")
6172
+ return "rating: number expected";
6173
+ if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution")) {
6174
+ var error = $root.google.maps.places.v1.AuthorAttribution.verify(message.authorAttribution);
6175
+ if (error)
6176
+ return "authorAttribution." + error;
6177
+ }
6178
+ if (message.publishTime != null && message.hasOwnProperty("publishTime")) {
6179
+ var error = $root.google.protobuf.Timestamp.verify(message.publishTime);
6180
+ if (error)
6181
+ return "publishTime." + error;
6488
6182
  }
6489
6183
  if (message.flagContentUri != null && message.hasOwnProperty("flagContentUri"))
6490
6184
  if (!$util.isString(message.flagContentUri))
@@ -6492,111 +6186,139 @@
6492
6186
  if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri"))
6493
6187
  if (!$util.isString(message.googleMapsUri))
6494
6188
  return "googleMapsUri: string expected";
6189
+ if (message.visitDate != null && message.hasOwnProperty("visitDate")) {
6190
+ var error = $root.google.type.Date.verify(message.visitDate);
6191
+ if (error)
6192
+ return "visitDate." + error;
6193
+ }
6495
6194
  return null;
6496
6195
  };
6497
6196
 
6498
6197
  /**
6499
- * Creates a Photo message from a plain object. Also converts values to their respective internal types.
6198
+ * Creates a Review message from a plain object. Also converts values to their respective internal types.
6500
6199
  * @function fromObject
6501
- * @memberof google.maps.places.v1.Photo
6200
+ * @memberof google.maps.places.v1.Review
6502
6201
  * @static
6503
6202
  * @param {Object.<string,*>} object Plain object
6504
- * @returns {google.maps.places.v1.Photo} Photo
6203
+ * @returns {google.maps.places.v1.Review} Review
6505
6204
  */
6506
- Photo.fromObject = function fromObject(object) {
6507
- if (object instanceof $root.google.maps.places.v1.Photo)
6205
+ Review.fromObject = function fromObject(object) {
6206
+ if (object instanceof $root.google.maps.places.v1.Review)
6508
6207
  return object;
6509
- var message = new $root.google.maps.places.v1.Photo();
6208
+ var message = new $root.google.maps.places.v1.Review();
6510
6209
  if (object.name != null)
6511
6210
  message.name = String(object.name);
6512
- if (object.widthPx != null)
6513
- message.widthPx = object.widthPx | 0;
6514
- if (object.heightPx != null)
6515
- message.heightPx = object.heightPx | 0;
6516
- if (object.authorAttributions) {
6517
- if (!Array.isArray(object.authorAttributions))
6518
- throw TypeError(".google.maps.places.v1.Photo.authorAttributions: array expected");
6519
- message.authorAttributions = [];
6520
- for (var i = 0; i < object.authorAttributions.length; ++i) {
6521
- if (typeof object.authorAttributions[i] !== "object")
6522
- throw TypeError(".google.maps.places.v1.Photo.authorAttributions: object expected");
6523
- message.authorAttributions[i] = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttributions[i]);
6524
- }
6211
+ if (object.relativePublishTimeDescription != null)
6212
+ message.relativePublishTimeDescription = String(object.relativePublishTimeDescription);
6213
+ if (object.text != null) {
6214
+ if (typeof object.text !== "object")
6215
+ throw TypeError(".google.maps.places.v1.Review.text: object expected");
6216
+ message.text = $root.google.type.LocalizedText.fromObject(object.text);
6217
+ }
6218
+ if (object.originalText != null) {
6219
+ if (typeof object.originalText !== "object")
6220
+ throw TypeError(".google.maps.places.v1.Review.originalText: object expected");
6221
+ message.originalText = $root.google.type.LocalizedText.fromObject(object.originalText);
6222
+ }
6223
+ if (object.rating != null)
6224
+ message.rating = Number(object.rating);
6225
+ if (object.authorAttribution != null) {
6226
+ if (typeof object.authorAttribution !== "object")
6227
+ throw TypeError(".google.maps.places.v1.Review.authorAttribution: object expected");
6228
+ message.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.fromObject(object.authorAttribution);
6229
+ }
6230
+ if (object.publishTime != null) {
6231
+ if (typeof object.publishTime !== "object")
6232
+ throw TypeError(".google.maps.places.v1.Review.publishTime: object expected");
6233
+ message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime);
6525
6234
  }
6526
6235
  if (object.flagContentUri != null)
6527
6236
  message.flagContentUri = String(object.flagContentUri);
6528
6237
  if (object.googleMapsUri != null)
6529
6238
  message.googleMapsUri = String(object.googleMapsUri);
6239
+ if (object.visitDate != null) {
6240
+ if (typeof object.visitDate !== "object")
6241
+ throw TypeError(".google.maps.places.v1.Review.visitDate: object expected");
6242
+ message.visitDate = $root.google.type.Date.fromObject(object.visitDate);
6243
+ }
6530
6244
  return message;
6531
6245
  };
6532
6246
 
6533
6247
  /**
6534
- * Creates a plain object from a Photo message. Also converts values to other types if specified.
6248
+ * Creates a plain object from a Review message. Also converts values to other types if specified.
6535
6249
  * @function toObject
6536
- * @memberof google.maps.places.v1.Photo
6250
+ * @memberof google.maps.places.v1.Review
6537
6251
  * @static
6538
- * @param {google.maps.places.v1.Photo} message Photo
6252
+ * @param {google.maps.places.v1.Review} message Review
6539
6253
  * @param {$protobuf.IConversionOptions} [options] Conversion options
6540
6254
  * @returns {Object.<string,*>} Plain object
6541
6255
  */
6542
- Photo.toObject = function toObject(message, options) {
6256
+ Review.toObject = function toObject(message, options) {
6543
6257
  if (!options)
6544
6258
  options = {};
6545
6259
  var object = {};
6546
- if (options.arrays || options.defaults)
6547
- object.authorAttributions = [];
6548
6260
  if (options.defaults) {
6549
6261
  object.name = "";
6550
- object.widthPx = 0;
6551
- object.heightPx = 0;
6262
+ object.relativePublishTimeDescription = "";
6263
+ object.rating = 0;
6264
+ object.text = null;
6265
+ object.originalText = null;
6266
+ object.authorAttribution = null;
6267
+ object.publishTime = null;
6552
6268
  object.flagContentUri = "";
6553
6269
  object.googleMapsUri = "";
6270
+ object.visitDate = null;
6554
6271
  }
6555
6272
  if (message.name != null && message.hasOwnProperty("name"))
6556
6273
  object.name = message.name;
6557
- if (message.widthPx != null && message.hasOwnProperty("widthPx"))
6558
- object.widthPx = message.widthPx;
6559
- if (message.heightPx != null && message.hasOwnProperty("heightPx"))
6560
- object.heightPx = message.heightPx;
6561
- if (message.authorAttributions && message.authorAttributions.length) {
6562
- object.authorAttributions = [];
6563
- for (var j = 0; j < message.authorAttributions.length; ++j)
6564
- object.authorAttributions[j] = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttributions[j], options);
6565
- }
6274
+ if (message.relativePublishTimeDescription != null && message.hasOwnProperty("relativePublishTimeDescription"))
6275
+ object.relativePublishTimeDescription = message.relativePublishTimeDescription;
6276
+ if (message.rating != null && message.hasOwnProperty("rating"))
6277
+ object.rating = options.json && !isFinite(message.rating) ? String(message.rating) : message.rating;
6278
+ if (message.text != null && message.hasOwnProperty("text"))
6279
+ object.text = $root.google.type.LocalizedText.toObject(message.text, options);
6280
+ if (message.originalText != null && message.hasOwnProperty("originalText"))
6281
+ object.originalText = $root.google.type.LocalizedText.toObject(message.originalText, options);
6282
+ if (message.authorAttribution != null && message.hasOwnProperty("authorAttribution"))
6283
+ object.authorAttribution = $root.google.maps.places.v1.AuthorAttribution.toObject(message.authorAttribution, options);
6284
+ if (message.publishTime != null && message.hasOwnProperty("publishTime"))
6285
+ object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options);
6566
6286
  if (message.flagContentUri != null && message.hasOwnProperty("flagContentUri"))
6567
6287
  object.flagContentUri = message.flagContentUri;
6568
6288
  if (message.googleMapsUri != null && message.hasOwnProperty("googleMapsUri"))
6569
6289
  object.googleMapsUri = message.googleMapsUri;
6290
+ if (message.visitDate != null && message.hasOwnProperty("visitDate"))
6291
+ object.visitDate = $root.google.type.Date.toObject(message.visitDate, options);
6570
6292
  return object;
6571
6293
  };
6572
6294
 
6573
6295
  /**
6574
- * Converts this Photo to JSON.
6296
+ * Converts this Review to JSON.
6575
6297
  * @function toJSON
6576
- * @memberof google.maps.places.v1.Photo
6298
+ * @memberof google.maps.places.v1.Review
6577
6299
  * @instance
6578
6300
  * @returns {Object.<string,*>} JSON object
6579
6301
  */
6580
- Photo.prototype.toJSON = function toJSON() {
6302
+ Review.prototype.toJSON = function toJSON() {
6581
6303
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
6582
6304
  };
6583
6305
 
6584
6306
  /**
6585
- * Gets the default type url for Photo
6307
+ * Gets the default type url for Review
6586
6308
  * @function getTypeUrl
6587
- * @memberof google.maps.places.v1.Photo
6309
+ * @memberof google.maps.places.v1.Review
6588
6310
  * @static
6589
6311
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
6590
6312
  * @returns {string} The default type url
6591
6313
  */
6592
- Photo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6314
+ Review.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
6593
6315
  if (typeUrlPrefix === undefined) {
6594
6316
  typeUrlPrefix = "type.googleapis.com";
6595
6317
  }
6596
- return typeUrlPrefix + "/google.maps.places.v1.Photo";
6318
+ return typeUrlPrefix + "/google.maps.places.v1.Review";
6597
6319
  };
6598
6320
 
6599
- return Photo;
6321
+ return Review;
6600
6322
  })();
6601
6323
 
6602
6324
  v1.EVChargeOptions = (function() {
@@ -8195,6 +7917,7 @@
8195
7917
  * @property {Array.<string>|null} [types] Place types
8196
7918
  * @property {string|null} [primaryType] Place primaryType
8197
7919
  * @property {google.type.ILocalizedText|null} [primaryTypeDisplayName] Place primaryTypeDisplayName
7920
+ * @property {google.type.ILocalizedText|null} [googleMapsTypeLabel] Place googleMapsTypeLabel
8198
7921
  * @property {string|null} [nationalPhoneNumber] Place nationalPhoneNumber
8199
7922
  * @property {string|null} [internationalPhoneNumber] Place internationalPhoneNumber
8200
7923
  * @property {string|null} [formattedAddress] Place formattedAddress
@@ -8256,6 +7979,7 @@
8256
7979
  * @property {Array.<google.maps.places.v1.Place.IContainingPlace>|null} [containingPlaces] Place containingPlaces
8257
7980
  * @property {boolean|null} [pureServiceAreaBusiness] Place pureServiceAreaBusiness
8258
7981
  * @property {google.maps.places.v1.IAddressDescriptor|null} [addressDescriptor] Place addressDescriptor
7982
+ * @property {google.maps.places.v1.Place.IGoogleMapsLinks|null} [googleMapsLinks] Place googleMapsLinks
8259
7983
  * @property {google.maps.places.v1.IPriceRange|null} [priceRange] Place priceRange
8260
7984
  * @property {google.maps.places.v1.Place.IReviewSummary|null} [reviewSummary] Place reviewSummary
8261
7985
  * @property {google.maps.places.v1.Place.IEvChargeAmenitySummary|null} [evChargeAmenitySummary] Place evChargeAmenitySummary
@@ -8337,6 +8061,14 @@
8337
8061
  */
8338
8062
  Place.prototype.primaryTypeDisplayName = null;
8339
8063
 
8064
+ /**
8065
+ * Place googleMapsTypeLabel.
8066
+ * @member {google.type.ILocalizedText|null|undefined} googleMapsTypeLabel
8067
+ * @memberof google.maps.places.v1.Place
8068
+ * @instance
8069
+ */
8070
+ Place.prototype.googleMapsTypeLabel = null;
8071
+
8340
8072
  /**
8341
8073
  * Place nationalPhoneNumber.
8342
8074
  * @member {string} nationalPhoneNumber
@@ -8825,6 +8557,14 @@
8825
8557
  */
8826
8558
  Place.prototype.addressDescriptor = null;
8827
8559
 
8560
+ /**
8561
+ * Place googleMapsLinks.
8562
+ * @member {google.maps.places.v1.Place.IGoogleMapsLinks|null|undefined} googleMapsLinks
8563
+ * @memberof google.maps.places.v1.Place
8564
+ * @instance
8565
+ */
8566
+ Place.prototype.googleMapsLinks = null;
8567
+
8828
8568
  /**
8829
8569
  * Place priceRange.
8830
8570
  * @member {google.maps.places.v1.IPriceRange|null|undefined} priceRange
@@ -9209,6 +8949,8 @@
9209
8949
  writer.uint32(/* id 83, wireType 0 =*/664).bool(message.pureServiceAreaBusiness);
9210
8950
  if (message.addressDescriptor != null && Object.hasOwnProperty.call(message, "addressDescriptor"))
9211
8951
  $root.google.maps.places.v1.AddressDescriptor.encode(message.addressDescriptor, writer.uint32(/* id 84, wireType 2 =*/674).fork()).ldelim();
8952
+ if (message.googleMapsLinks != null && Object.hasOwnProperty.call(message, "googleMapsLinks"))
8953
+ $root.google.maps.places.v1.Place.GoogleMapsLinks.encode(message.googleMapsLinks, writer.uint32(/* id 85, wireType 2 =*/682).fork()).ldelim();
9212
8954
  if (message.priceRange != null && Object.hasOwnProperty.call(message, "priceRange"))
9213
8955
  $root.google.maps.places.v1.PriceRange.encode(message.priceRange, writer.uint32(/* id 86, wireType 2 =*/690).fork()).ldelim();
9214
8956
  if (message.reviewSummary != null && Object.hasOwnProperty.call(message, "reviewSummary"))
@@ -9227,6 +8969,8 @@
9227
8969
  writer.uint32(/* id 93, wireType 2 =*/746).string(message.movedPlace);
9228
8970
  if (message.movedPlaceId != null && Object.hasOwnProperty.call(message, "movedPlaceId"))
9229
8971
  writer.uint32(/* id 94, wireType 2 =*/754).string(message.movedPlaceId);
8972
+ if (message.googleMapsTypeLabel != null && Object.hasOwnProperty.call(message, "googleMapsTypeLabel"))
8973
+ $root.google.type.LocalizedText.encode(message.googleMapsTypeLabel, writer.uint32(/* id 96, wireType 2 =*/770).fork()).ldelim();
9230
8974
  return writer;
9231
8975
  };
9232
8976
 
@@ -9289,6 +9033,10 @@
9289
9033
  message.primaryTypeDisplayName = $root.google.type.LocalizedText.decode(reader, reader.uint32());
9290
9034
  break;
9291
9035
  }
9036
+ case 96: {
9037
+ message.googleMapsTypeLabel = $root.google.type.LocalizedText.decode(reader, reader.uint32());
9038
+ break;
9039
+ }
9292
9040
  case 7: {
9293
9041
  message.nationalPhoneNumber = reader.string();
9294
9042
  break;
@@ -9549,6 +9297,10 @@
9549
9297
  message.addressDescriptor = $root.google.maps.places.v1.AddressDescriptor.decode(reader, reader.uint32());
9550
9298
  break;
9551
9299
  }
9300
+ case 85: {
9301
+ message.googleMapsLinks = $root.google.maps.places.v1.Place.GoogleMapsLinks.decode(reader, reader.uint32());
9302
+ break;
9303
+ }
9552
9304
  case 86: {
9553
9305
  message.priceRange = $root.google.maps.places.v1.PriceRange.decode(reader, reader.uint32());
9554
9306
  break;
@@ -9639,6 +9391,11 @@
9639
9391
  if (error)
9640
9392
  return "primaryTypeDisplayName." + error;
9641
9393
  }
9394
+ if (message.googleMapsTypeLabel != null && message.hasOwnProperty("googleMapsTypeLabel")) {
9395
+ var error = $root.google.type.LocalizedText.verify(message.googleMapsTypeLabel);
9396
+ if (error)
9397
+ return "googleMapsTypeLabel." + error;
9398
+ }
9642
9399
  if (message.nationalPhoneNumber != null && message.hasOwnProperty("nationalPhoneNumber"))
9643
9400
  if (!$util.isString(message.nationalPhoneNumber))
9644
9401
  return "nationalPhoneNumber: string expected";
@@ -9971,6 +9728,11 @@
9971
9728
  if (error)
9972
9729
  return "addressDescriptor." + error;
9973
9730
  }
9731
+ if (message.googleMapsLinks != null && message.hasOwnProperty("googleMapsLinks")) {
9732
+ var error = $root.google.maps.places.v1.Place.GoogleMapsLinks.verify(message.googleMapsLinks);
9733
+ if (error)
9734
+ return "googleMapsLinks." + error;
9735
+ }
9974
9736
  if (message.priceRange != null && message.hasOwnProperty("priceRange")) {
9975
9737
  var error = $root.google.maps.places.v1.PriceRange.verify(message.priceRange);
9976
9738
  if (error)
@@ -10040,6 +9802,11 @@
10040
9802
  throw TypeError(".google.maps.places.v1.Place.primaryTypeDisplayName: object expected");
10041
9803
  message.primaryTypeDisplayName = $root.google.type.LocalizedText.fromObject(object.primaryTypeDisplayName);
10042
9804
  }
9805
+ if (object.googleMapsTypeLabel != null) {
9806
+ if (typeof object.googleMapsTypeLabel !== "object")
9807
+ throw TypeError(".google.maps.places.v1.Place.googleMapsTypeLabel: object expected");
9808
+ message.googleMapsTypeLabel = $root.google.type.LocalizedText.fromObject(object.googleMapsTypeLabel);
9809
+ }
10043
9810
  if (object.nationalPhoneNumber != null)
10044
9811
  message.nationalPhoneNumber = String(object.nationalPhoneNumber);
10045
9812
  if (object.internationalPhoneNumber != null)
@@ -10323,6 +10090,11 @@
10323
10090
  throw TypeError(".google.maps.places.v1.Place.addressDescriptor: object expected");
10324
10091
  message.addressDescriptor = $root.google.maps.places.v1.AddressDescriptor.fromObject(object.addressDescriptor);
10325
10092
  }
10093
+ if (object.googleMapsLinks != null) {
10094
+ if (typeof object.googleMapsLinks !== "object")
10095
+ throw TypeError(".google.maps.places.v1.Place.googleMapsLinks: object expected");
10096
+ message.googleMapsLinks = $root.google.maps.places.v1.Place.GoogleMapsLinks.fromObject(object.googleMapsLinks);
10097
+ }
10326
10098
  if (object.priceRange != null) {
10327
10099
  if (typeof object.priceRange !== "object")
10328
10100
  throw TypeError(".google.maps.places.v1.Place.priceRange: object expected");
@@ -10409,6 +10181,7 @@
10409
10181
  object.evChargeOptions = null;
10410
10182
  object.generativeSummary = null;
10411
10183
  object.addressDescriptor = null;
10184
+ object.googleMapsLinks = null;
10412
10185
  object.priceRange = null;
10413
10186
  object.reviewSummary = null;
10414
10187
  object.timeZone = null;
@@ -10418,6 +10191,7 @@
10418
10191
  object.consumerAlert = null;
10419
10192
  object.movedPlace = "";
10420
10193
  object.movedPlaceId = "";
10194
+ object.googleMapsTypeLabel = null;
10421
10195
  }
10422
10196
  if (message.name != null && message.hasOwnProperty("name"))
10423
10197
  object.name = message.name;
@@ -10657,6 +10431,8 @@
10657
10431
  }
10658
10432
  if (message.addressDescriptor != null && message.hasOwnProperty("addressDescriptor"))
10659
10433
  object.addressDescriptor = $root.google.maps.places.v1.AddressDescriptor.toObject(message.addressDescriptor, options);
10434
+ if (message.googleMapsLinks != null && message.hasOwnProperty("googleMapsLinks"))
10435
+ object.googleMapsLinks = $root.google.maps.places.v1.Place.GoogleMapsLinks.toObject(message.googleMapsLinks, options);
10660
10436
  if (message.priceRange != null && message.hasOwnProperty("priceRange"))
10661
10437
  object.priceRange = $root.google.maps.places.v1.PriceRange.toObject(message.priceRange, options);
10662
10438
  if (message.reviewSummary != null && message.hasOwnProperty("reviewSummary"))
@@ -10675,6 +10451,8 @@
10675
10451
  object.movedPlace = message.movedPlace;
10676
10452
  if (message.movedPlaceId != null && message.hasOwnProperty("movedPlaceId"))
10677
10453
  object.movedPlaceId = message.movedPlaceId;
10454
+ if (message.googleMapsTypeLabel != null && message.hasOwnProperty("googleMapsTypeLabel"))
10455
+ object.googleMapsTypeLabel = $root.google.type.LocalizedText.toObject(message.googleMapsTypeLabel, options);
10678
10456
  return object;
10679
10457
  };
10680
10458
 
@@ -14306,63 +14084,295 @@
14306
14084
  object.overviewFlagContentUri = "";
14307
14085
  object.disclosureText = null;
14308
14086
  }
14309
- if (message.overview != null && message.hasOwnProperty("overview"))
14310
- object.overview = $root.google.type.LocalizedText.toObject(message.overview, options);
14311
- if (message.overviewFlagContentUri != null && message.hasOwnProperty("overviewFlagContentUri"))
14312
- object.overviewFlagContentUri = message.overviewFlagContentUri;
14313
- if (message.disclosureText != null && message.hasOwnProperty("disclosureText"))
14314
- object.disclosureText = $root.google.type.LocalizedText.toObject(message.disclosureText, options);
14087
+ if (message.overview != null && message.hasOwnProperty("overview"))
14088
+ object.overview = $root.google.type.LocalizedText.toObject(message.overview, options);
14089
+ if (message.overviewFlagContentUri != null && message.hasOwnProperty("overviewFlagContentUri"))
14090
+ object.overviewFlagContentUri = message.overviewFlagContentUri;
14091
+ if (message.disclosureText != null && message.hasOwnProperty("disclosureText"))
14092
+ object.disclosureText = $root.google.type.LocalizedText.toObject(message.disclosureText, options);
14093
+ return object;
14094
+ };
14095
+
14096
+ /**
14097
+ * Converts this GenerativeSummary to JSON.
14098
+ * @function toJSON
14099
+ * @memberof google.maps.places.v1.Place.GenerativeSummary
14100
+ * @instance
14101
+ * @returns {Object.<string,*>} JSON object
14102
+ */
14103
+ GenerativeSummary.prototype.toJSON = function toJSON() {
14104
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
14105
+ };
14106
+
14107
+ /**
14108
+ * Gets the default type url for GenerativeSummary
14109
+ * @function getTypeUrl
14110
+ * @memberof google.maps.places.v1.Place.GenerativeSummary
14111
+ * @static
14112
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
14113
+ * @returns {string} The default type url
14114
+ */
14115
+ GenerativeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14116
+ if (typeUrlPrefix === undefined) {
14117
+ typeUrlPrefix = "type.googleapis.com";
14118
+ }
14119
+ return typeUrlPrefix + "/google.maps.places.v1.Place.GenerativeSummary";
14120
+ };
14121
+
14122
+ return GenerativeSummary;
14123
+ })();
14124
+
14125
+ Place.ContainingPlace = (function() {
14126
+
14127
+ /**
14128
+ * Properties of a ContainingPlace.
14129
+ * @memberof google.maps.places.v1.Place
14130
+ * @interface IContainingPlace
14131
+ * @property {string|null} [name] ContainingPlace name
14132
+ * @property {string|null} [id] ContainingPlace id
14133
+ */
14134
+
14135
+ /**
14136
+ * Constructs a new ContainingPlace.
14137
+ * @memberof google.maps.places.v1.Place
14138
+ * @classdesc Represents a ContainingPlace.
14139
+ * @implements IContainingPlace
14140
+ * @constructor
14141
+ * @param {google.maps.places.v1.Place.IContainingPlace=} [properties] Properties to set
14142
+ */
14143
+ function ContainingPlace(properties) {
14144
+ if (properties)
14145
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
14146
+ if (properties[keys[i]] != null)
14147
+ this[keys[i]] = properties[keys[i]];
14148
+ }
14149
+
14150
+ /**
14151
+ * ContainingPlace name.
14152
+ * @member {string} name
14153
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14154
+ * @instance
14155
+ */
14156
+ ContainingPlace.prototype.name = "";
14157
+
14158
+ /**
14159
+ * ContainingPlace id.
14160
+ * @member {string} id
14161
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14162
+ * @instance
14163
+ */
14164
+ ContainingPlace.prototype.id = "";
14165
+
14166
+ /**
14167
+ * Creates a new ContainingPlace instance using the specified properties.
14168
+ * @function create
14169
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14170
+ * @static
14171
+ * @param {google.maps.places.v1.Place.IContainingPlace=} [properties] Properties to set
14172
+ * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace instance
14173
+ */
14174
+ ContainingPlace.create = function create(properties) {
14175
+ return new ContainingPlace(properties);
14176
+ };
14177
+
14178
+ /**
14179
+ * Encodes the specified ContainingPlace message. Does not implicitly {@link google.maps.places.v1.Place.ContainingPlace.verify|verify} messages.
14180
+ * @function encode
14181
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14182
+ * @static
14183
+ * @param {google.maps.places.v1.Place.IContainingPlace} message ContainingPlace message or plain object to encode
14184
+ * @param {$protobuf.Writer} [writer] Writer to encode to
14185
+ * @returns {$protobuf.Writer} Writer
14186
+ */
14187
+ ContainingPlace.encode = function encode(message, writer) {
14188
+ if (!writer)
14189
+ writer = $Writer.create();
14190
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
14191
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
14192
+ if (message.id != null && Object.hasOwnProperty.call(message, "id"))
14193
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
14194
+ return writer;
14195
+ };
14196
+
14197
+ /**
14198
+ * Encodes the specified ContainingPlace message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ContainingPlace.verify|verify} messages.
14199
+ * @function encodeDelimited
14200
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14201
+ * @static
14202
+ * @param {google.maps.places.v1.Place.IContainingPlace} message ContainingPlace message or plain object to encode
14203
+ * @param {$protobuf.Writer} [writer] Writer to encode to
14204
+ * @returns {$protobuf.Writer} Writer
14205
+ */
14206
+ ContainingPlace.encodeDelimited = function encodeDelimited(message, writer) {
14207
+ return this.encode(message, writer).ldelim();
14208
+ };
14209
+
14210
+ /**
14211
+ * Decodes a ContainingPlace message from the specified reader or buffer.
14212
+ * @function decode
14213
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14214
+ * @static
14215
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
14216
+ * @param {number} [length] Message length if known beforehand
14217
+ * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace
14218
+ * @throws {Error} If the payload is not a reader or valid buffer
14219
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
14220
+ */
14221
+ ContainingPlace.decode = function decode(reader, length, error) {
14222
+ if (!(reader instanceof $Reader))
14223
+ reader = $Reader.create(reader);
14224
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.ContainingPlace();
14225
+ while (reader.pos < end) {
14226
+ var tag = reader.uint32();
14227
+ if (tag === error)
14228
+ break;
14229
+ switch (tag >>> 3) {
14230
+ case 1: {
14231
+ message.name = reader.string();
14232
+ break;
14233
+ }
14234
+ case 2: {
14235
+ message.id = reader.string();
14236
+ break;
14237
+ }
14238
+ default:
14239
+ reader.skipType(tag & 7);
14240
+ break;
14241
+ }
14242
+ }
14243
+ return message;
14244
+ };
14245
+
14246
+ /**
14247
+ * Decodes a ContainingPlace message from the specified reader or buffer, length delimited.
14248
+ * @function decodeDelimited
14249
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14250
+ * @static
14251
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
14252
+ * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace
14253
+ * @throws {Error} If the payload is not a reader or valid buffer
14254
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
14255
+ */
14256
+ ContainingPlace.decodeDelimited = function decodeDelimited(reader) {
14257
+ if (!(reader instanceof $Reader))
14258
+ reader = new $Reader(reader);
14259
+ return this.decode(reader, reader.uint32());
14260
+ };
14261
+
14262
+ /**
14263
+ * Verifies a ContainingPlace message.
14264
+ * @function verify
14265
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14266
+ * @static
14267
+ * @param {Object.<string,*>} message Plain object to verify
14268
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
14269
+ */
14270
+ ContainingPlace.verify = function verify(message) {
14271
+ if (typeof message !== "object" || message === null)
14272
+ return "object expected";
14273
+ if (message.name != null && message.hasOwnProperty("name"))
14274
+ if (!$util.isString(message.name))
14275
+ return "name: string expected";
14276
+ if (message.id != null && message.hasOwnProperty("id"))
14277
+ if (!$util.isString(message.id))
14278
+ return "id: string expected";
14279
+ return null;
14280
+ };
14281
+
14282
+ /**
14283
+ * Creates a ContainingPlace message from a plain object. Also converts values to their respective internal types.
14284
+ * @function fromObject
14285
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14286
+ * @static
14287
+ * @param {Object.<string,*>} object Plain object
14288
+ * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace
14289
+ */
14290
+ ContainingPlace.fromObject = function fromObject(object) {
14291
+ if (object instanceof $root.google.maps.places.v1.Place.ContainingPlace)
14292
+ return object;
14293
+ var message = new $root.google.maps.places.v1.Place.ContainingPlace();
14294
+ if (object.name != null)
14295
+ message.name = String(object.name);
14296
+ if (object.id != null)
14297
+ message.id = String(object.id);
14298
+ return message;
14299
+ };
14300
+
14301
+ /**
14302
+ * Creates a plain object from a ContainingPlace message. Also converts values to other types if specified.
14303
+ * @function toObject
14304
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14305
+ * @static
14306
+ * @param {google.maps.places.v1.Place.ContainingPlace} message ContainingPlace
14307
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
14308
+ * @returns {Object.<string,*>} Plain object
14309
+ */
14310
+ ContainingPlace.toObject = function toObject(message, options) {
14311
+ if (!options)
14312
+ options = {};
14313
+ var object = {};
14314
+ if (options.defaults) {
14315
+ object.name = "";
14316
+ object.id = "";
14317
+ }
14318
+ if (message.name != null && message.hasOwnProperty("name"))
14319
+ object.name = message.name;
14320
+ if (message.id != null && message.hasOwnProperty("id"))
14321
+ object.id = message.id;
14315
14322
  return object;
14316
14323
  };
14317
14324
 
14318
14325
  /**
14319
- * Converts this GenerativeSummary to JSON.
14326
+ * Converts this ContainingPlace to JSON.
14320
14327
  * @function toJSON
14321
- * @memberof google.maps.places.v1.Place.GenerativeSummary
14328
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14322
14329
  * @instance
14323
14330
  * @returns {Object.<string,*>} JSON object
14324
14331
  */
14325
- GenerativeSummary.prototype.toJSON = function toJSON() {
14332
+ ContainingPlace.prototype.toJSON = function toJSON() {
14326
14333
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
14327
14334
  };
14328
14335
 
14329
14336
  /**
14330
- * Gets the default type url for GenerativeSummary
14337
+ * Gets the default type url for ContainingPlace
14331
14338
  * @function getTypeUrl
14332
- * @memberof google.maps.places.v1.Place.GenerativeSummary
14339
+ * @memberof google.maps.places.v1.Place.ContainingPlace
14333
14340
  * @static
14334
14341
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
14335
14342
  * @returns {string} The default type url
14336
14343
  */
14337
- GenerativeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14344
+ ContainingPlace.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14338
14345
  if (typeUrlPrefix === undefined) {
14339
14346
  typeUrlPrefix = "type.googleapis.com";
14340
14347
  }
14341
- return typeUrlPrefix + "/google.maps.places.v1.Place.GenerativeSummary";
14348
+ return typeUrlPrefix + "/google.maps.places.v1.Place.ContainingPlace";
14342
14349
  };
14343
14350
 
14344
- return GenerativeSummary;
14351
+ return ContainingPlace;
14345
14352
  })();
14346
14353
 
14347
- Place.ContainingPlace = (function() {
14354
+ Place.GoogleMapsLinks = (function() {
14348
14355
 
14349
14356
  /**
14350
- * Properties of a ContainingPlace.
14357
+ * Properties of a GoogleMapsLinks.
14351
14358
  * @memberof google.maps.places.v1.Place
14352
- * @interface IContainingPlace
14353
- * @property {string|null} [name] ContainingPlace name
14354
- * @property {string|null} [id] ContainingPlace id
14359
+ * @interface IGoogleMapsLinks
14360
+ * @property {string|null} [directionsUri] GoogleMapsLinks directionsUri
14361
+ * @property {string|null} [placeUri] GoogleMapsLinks placeUri
14362
+ * @property {string|null} [writeAReviewUri] GoogleMapsLinks writeAReviewUri
14363
+ * @property {string|null} [reviewsUri] GoogleMapsLinks reviewsUri
14364
+ * @property {string|null} [photosUri] GoogleMapsLinks photosUri
14355
14365
  */
14356
14366
 
14357
14367
  /**
14358
- * Constructs a new ContainingPlace.
14368
+ * Constructs a new GoogleMapsLinks.
14359
14369
  * @memberof google.maps.places.v1.Place
14360
- * @classdesc Represents a ContainingPlace.
14361
- * @implements IContainingPlace
14370
+ * @classdesc Represents a GoogleMapsLinks.
14371
+ * @implements IGoogleMapsLinks
14362
14372
  * @constructor
14363
- * @param {google.maps.places.v1.Place.IContainingPlace=} [properties] Properties to set
14373
+ * @param {google.maps.places.v1.Place.IGoogleMapsLinks=} [properties] Properties to set
14364
14374
  */
14365
- function ContainingPlace(properties) {
14375
+ function GoogleMapsLinks(properties) {
14366
14376
  if (properties)
14367
14377
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
14368
14378
  if (properties[keys[i]] != null)
@@ -14370,91 +14380,133 @@
14370
14380
  }
14371
14381
 
14372
14382
  /**
14373
- * ContainingPlace name.
14374
- * @member {string} name
14375
- * @memberof google.maps.places.v1.Place.ContainingPlace
14383
+ * GoogleMapsLinks directionsUri.
14384
+ * @member {string} directionsUri
14385
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14376
14386
  * @instance
14377
14387
  */
14378
- ContainingPlace.prototype.name = "";
14388
+ GoogleMapsLinks.prototype.directionsUri = "";
14379
14389
 
14380
14390
  /**
14381
- * ContainingPlace id.
14382
- * @member {string} id
14383
- * @memberof google.maps.places.v1.Place.ContainingPlace
14391
+ * GoogleMapsLinks placeUri.
14392
+ * @member {string} placeUri
14393
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14384
14394
  * @instance
14385
14395
  */
14386
- ContainingPlace.prototype.id = "";
14396
+ GoogleMapsLinks.prototype.placeUri = "";
14387
14397
 
14388
14398
  /**
14389
- * Creates a new ContainingPlace instance using the specified properties.
14399
+ * GoogleMapsLinks writeAReviewUri.
14400
+ * @member {string} writeAReviewUri
14401
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14402
+ * @instance
14403
+ */
14404
+ GoogleMapsLinks.prototype.writeAReviewUri = "";
14405
+
14406
+ /**
14407
+ * GoogleMapsLinks reviewsUri.
14408
+ * @member {string} reviewsUri
14409
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14410
+ * @instance
14411
+ */
14412
+ GoogleMapsLinks.prototype.reviewsUri = "";
14413
+
14414
+ /**
14415
+ * GoogleMapsLinks photosUri.
14416
+ * @member {string} photosUri
14417
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14418
+ * @instance
14419
+ */
14420
+ GoogleMapsLinks.prototype.photosUri = "";
14421
+
14422
+ /**
14423
+ * Creates a new GoogleMapsLinks instance using the specified properties.
14390
14424
  * @function create
14391
- * @memberof google.maps.places.v1.Place.ContainingPlace
14425
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14392
14426
  * @static
14393
- * @param {google.maps.places.v1.Place.IContainingPlace=} [properties] Properties to set
14394
- * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace instance
14427
+ * @param {google.maps.places.v1.Place.IGoogleMapsLinks=} [properties] Properties to set
14428
+ * @returns {google.maps.places.v1.Place.GoogleMapsLinks} GoogleMapsLinks instance
14395
14429
  */
14396
- ContainingPlace.create = function create(properties) {
14397
- return new ContainingPlace(properties);
14430
+ GoogleMapsLinks.create = function create(properties) {
14431
+ return new GoogleMapsLinks(properties);
14398
14432
  };
14399
14433
 
14400
14434
  /**
14401
- * Encodes the specified ContainingPlace message. Does not implicitly {@link google.maps.places.v1.Place.ContainingPlace.verify|verify} messages.
14435
+ * Encodes the specified GoogleMapsLinks message. Does not implicitly {@link google.maps.places.v1.Place.GoogleMapsLinks.verify|verify} messages.
14402
14436
  * @function encode
14403
- * @memberof google.maps.places.v1.Place.ContainingPlace
14437
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14404
14438
  * @static
14405
- * @param {google.maps.places.v1.Place.IContainingPlace} message ContainingPlace message or plain object to encode
14439
+ * @param {google.maps.places.v1.Place.IGoogleMapsLinks} message GoogleMapsLinks message or plain object to encode
14406
14440
  * @param {$protobuf.Writer} [writer] Writer to encode to
14407
14441
  * @returns {$protobuf.Writer} Writer
14408
14442
  */
14409
- ContainingPlace.encode = function encode(message, writer) {
14443
+ GoogleMapsLinks.encode = function encode(message, writer) {
14410
14444
  if (!writer)
14411
14445
  writer = $Writer.create();
14412
- if (message.name != null && Object.hasOwnProperty.call(message, "name"))
14413
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
14414
- if (message.id != null && Object.hasOwnProperty.call(message, "id"))
14415
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.id);
14446
+ if (message.directionsUri != null && Object.hasOwnProperty.call(message, "directionsUri"))
14447
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.directionsUri);
14448
+ if (message.placeUri != null && Object.hasOwnProperty.call(message, "placeUri"))
14449
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeUri);
14450
+ if (message.writeAReviewUri != null && Object.hasOwnProperty.call(message, "writeAReviewUri"))
14451
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.writeAReviewUri);
14452
+ if (message.reviewsUri != null && Object.hasOwnProperty.call(message, "reviewsUri"))
14453
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.reviewsUri);
14454
+ if (message.photosUri != null && Object.hasOwnProperty.call(message, "photosUri"))
14455
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.photosUri);
14416
14456
  return writer;
14417
14457
  };
14418
14458
 
14419
14459
  /**
14420
- * Encodes the specified ContainingPlace message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.ContainingPlace.verify|verify} messages.
14460
+ * Encodes the specified GoogleMapsLinks message, length delimited. Does not implicitly {@link google.maps.places.v1.Place.GoogleMapsLinks.verify|verify} messages.
14421
14461
  * @function encodeDelimited
14422
- * @memberof google.maps.places.v1.Place.ContainingPlace
14462
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14423
14463
  * @static
14424
- * @param {google.maps.places.v1.Place.IContainingPlace} message ContainingPlace message or plain object to encode
14464
+ * @param {google.maps.places.v1.Place.IGoogleMapsLinks} message GoogleMapsLinks message or plain object to encode
14425
14465
  * @param {$protobuf.Writer} [writer] Writer to encode to
14426
14466
  * @returns {$protobuf.Writer} Writer
14427
14467
  */
14428
- ContainingPlace.encodeDelimited = function encodeDelimited(message, writer) {
14468
+ GoogleMapsLinks.encodeDelimited = function encodeDelimited(message, writer) {
14429
14469
  return this.encode(message, writer).ldelim();
14430
14470
  };
14431
14471
 
14432
14472
  /**
14433
- * Decodes a ContainingPlace message from the specified reader or buffer.
14473
+ * Decodes a GoogleMapsLinks message from the specified reader or buffer.
14434
14474
  * @function decode
14435
- * @memberof google.maps.places.v1.Place.ContainingPlace
14475
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14436
14476
  * @static
14437
14477
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
14438
14478
  * @param {number} [length] Message length if known beforehand
14439
- * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace
14479
+ * @returns {google.maps.places.v1.Place.GoogleMapsLinks} GoogleMapsLinks
14440
14480
  * @throws {Error} If the payload is not a reader or valid buffer
14441
14481
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
14442
14482
  */
14443
- ContainingPlace.decode = function decode(reader, length, error) {
14483
+ GoogleMapsLinks.decode = function decode(reader, length, error) {
14444
14484
  if (!(reader instanceof $Reader))
14445
14485
  reader = $Reader.create(reader);
14446
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.ContainingPlace();
14486
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Place.GoogleMapsLinks();
14447
14487
  while (reader.pos < end) {
14448
14488
  var tag = reader.uint32();
14449
14489
  if (tag === error)
14450
14490
  break;
14451
14491
  switch (tag >>> 3) {
14452
14492
  case 1: {
14453
- message.name = reader.string();
14493
+ message.directionsUri = reader.string();
14454
14494
  break;
14455
14495
  }
14456
14496
  case 2: {
14457
- message.id = reader.string();
14497
+ message.placeUri = reader.string();
14498
+ break;
14499
+ }
14500
+ case 3: {
14501
+ message.writeAReviewUri = reader.string();
14502
+ break;
14503
+ }
14504
+ case 4: {
14505
+ message.reviewsUri = reader.string();
14506
+ break;
14507
+ }
14508
+ case 5: {
14509
+ message.photosUri = reader.string();
14458
14510
  break;
14459
14511
  }
14460
14512
  default:
@@ -14466,111 +14518,135 @@
14466
14518
  };
14467
14519
 
14468
14520
  /**
14469
- * Decodes a ContainingPlace message from the specified reader or buffer, length delimited.
14521
+ * Decodes a GoogleMapsLinks message from the specified reader or buffer, length delimited.
14470
14522
  * @function decodeDelimited
14471
- * @memberof google.maps.places.v1.Place.ContainingPlace
14523
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14472
14524
  * @static
14473
14525
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
14474
- * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace
14526
+ * @returns {google.maps.places.v1.Place.GoogleMapsLinks} GoogleMapsLinks
14475
14527
  * @throws {Error} If the payload is not a reader or valid buffer
14476
14528
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
14477
14529
  */
14478
- ContainingPlace.decodeDelimited = function decodeDelimited(reader) {
14530
+ GoogleMapsLinks.decodeDelimited = function decodeDelimited(reader) {
14479
14531
  if (!(reader instanceof $Reader))
14480
14532
  reader = new $Reader(reader);
14481
14533
  return this.decode(reader, reader.uint32());
14482
14534
  };
14483
14535
 
14484
14536
  /**
14485
- * Verifies a ContainingPlace message.
14537
+ * Verifies a GoogleMapsLinks message.
14486
14538
  * @function verify
14487
- * @memberof google.maps.places.v1.Place.ContainingPlace
14539
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14488
14540
  * @static
14489
14541
  * @param {Object.<string,*>} message Plain object to verify
14490
14542
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
14491
14543
  */
14492
- ContainingPlace.verify = function verify(message) {
14544
+ GoogleMapsLinks.verify = function verify(message) {
14493
14545
  if (typeof message !== "object" || message === null)
14494
14546
  return "object expected";
14495
- if (message.name != null && message.hasOwnProperty("name"))
14496
- if (!$util.isString(message.name))
14497
- return "name: string expected";
14498
- if (message.id != null && message.hasOwnProperty("id"))
14499
- if (!$util.isString(message.id))
14500
- return "id: string expected";
14547
+ if (message.directionsUri != null && message.hasOwnProperty("directionsUri"))
14548
+ if (!$util.isString(message.directionsUri))
14549
+ return "directionsUri: string expected";
14550
+ if (message.placeUri != null && message.hasOwnProperty("placeUri"))
14551
+ if (!$util.isString(message.placeUri))
14552
+ return "placeUri: string expected";
14553
+ if (message.writeAReviewUri != null && message.hasOwnProperty("writeAReviewUri"))
14554
+ if (!$util.isString(message.writeAReviewUri))
14555
+ return "writeAReviewUri: string expected";
14556
+ if (message.reviewsUri != null && message.hasOwnProperty("reviewsUri"))
14557
+ if (!$util.isString(message.reviewsUri))
14558
+ return "reviewsUri: string expected";
14559
+ if (message.photosUri != null && message.hasOwnProperty("photosUri"))
14560
+ if (!$util.isString(message.photosUri))
14561
+ return "photosUri: string expected";
14501
14562
  return null;
14502
14563
  };
14503
14564
 
14504
14565
  /**
14505
- * Creates a ContainingPlace message from a plain object. Also converts values to their respective internal types.
14566
+ * Creates a GoogleMapsLinks message from a plain object. Also converts values to their respective internal types.
14506
14567
  * @function fromObject
14507
- * @memberof google.maps.places.v1.Place.ContainingPlace
14568
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14508
14569
  * @static
14509
14570
  * @param {Object.<string,*>} object Plain object
14510
- * @returns {google.maps.places.v1.Place.ContainingPlace} ContainingPlace
14571
+ * @returns {google.maps.places.v1.Place.GoogleMapsLinks} GoogleMapsLinks
14511
14572
  */
14512
- ContainingPlace.fromObject = function fromObject(object) {
14513
- if (object instanceof $root.google.maps.places.v1.Place.ContainingPlace)
14573
+ GoogleMapsLinks.fromObject = function fromObject(object) {
14574
+ if (object instanceof $root.google.maps.places.v1.Place.GoogleMapsLinks)
14514
14575
  return object;
14515
- var message = new $root.google.maps.places.v1.Place.ContainingPlace();
14516
- if (object.name != null)
14517
- message.name = String(object.name);
14518
- if (object.id != null)
14519
- message.id = String(object.id);
14576
+ var message = new $root.google.maps.places.v1.Place.GoogleMapsLinks();
14577
+ if (object.directionsUri != null)
14578
+ message.directionsUri = String(object.directionsUri);
14579
+ if (object.placeUri != null)
14580
+ message.placeUri = String(object.placeUri);
14581
+ if (object.writeAReviewUri != null)
14582
+ message.writeAReviewUri = String(object.writeAReviewUri);
14583
+ if (object.reviewsUri != null)
14584
+ message.reviewsUri = String(object.reviewsUri);
14585
+ if (object.photosUri != null)
14586
+ message.photosUri = String(object.photosUri);
14520
14587
  return message;
14521
14588
  };
14522
14589
 
14523
14590
  /**
14524
- * Creates a plain object from a ContainingPlace message. Also converts values to other types if specified.
14591
+ * Creates a plain object from a GoogleMapsLinks message. Also converts values to other types if specified.
14525
14592
  * @function toObject
14526
- * @memberof google.maps.places.v1.Place.ContainingPlace
14593
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14527
14594
  * @static
14528
- * @param {google.maps.places.v1.Place.ContainingPlace} message ContainingPlace
14595
+ * @param {google.maps.places.v1.Place.GoogleMapsLinks} message GoogleMapsLinks
14529
14596
  * @param {$protobuf.IConversionOptions} [options] Conversion options
14530
14597
  * @returns {Object.<string,*>} Plain object
14531
14598
  */
14532
- ContainingPlace.toObject = function toObject(message, options) {
14599
+ GoogleMapsLinks.toObject = function toObject(message, options) {
14533
14600
  if (!options)
14534
14601
  options = {};
14535
14602
  var object = {};
14536
14603
  if (options.defaults) {
14537
- object.name = "";
14538
- object.id = "";
14539
- }
14540
- if (message.name != null && message.hasOwnProperty("name"))
14541
- object.name = message.name;
14542
- if (message.id != null && message.hasOwnProperty("id"))
14543
- object.id = message.id;
14604
+ object.directionsUri = "";
14605
+ object.placeUri = "";
14606
+ object.writeAReviewUri = "";
14607
+ object.reviewsUri = "";
14608
+ object.photosUri = "";
14609
+ }
14610
+ if (message.directionsUri != null && message.hasOwnProperty("directionsUri"))
14611
+ object.directionsUri = message.directionsUri;
14612
+ if (message.placeUri != null && message.hasOwnProperty("placeUri"))
14613
+ object.placeUri = message.placeUri;
14614
+ if (message.writeAReviewUri != null && message.hasOwnProperty("writeAReviewUri"))
14615
+ object.writeAReviewUri = message.writeAReviewUri;
14616
+ if (message.reviewsUri != null && message.hasOwnProperty("reviewsUri"))
14617
+ object.reviewsUri = message.reviewsUri;
14618
+ if (message.photosUri != null && message.hasOwnProperty("photosUri"))
14619
+ object.photosUri = message.photosUri;
14544
14620
  return object;
14545
14621
  };
14546
14622
 
14547
14623
  /**
14548
- * Converts this ContainingPlace to JSON.
14624
+ * Converts this GoogleMapsLinks to JSON.
14549
14625
  * @function toJSON
14550
- * @memberof google.maps.places.v1.Place.ContainingPlace
14626
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14551
14627
  * @instance
14552
14628
  * @returns {Object.<string,*>} JSON object
14553
14629
  */
14554
- ContainingPlace.prototype.toJSON = function toJSON() {
14630
+ GoogleMapsLinks.prototype.toJSON = function toJSON() {
14555
14631
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
14556
14632
  };
14557
14633
 
14558
14634
  /**
14559
- * Gets the default type url for ContainingPlace
14635
+ * Gets the default type url for GoogleMapsLinks
14560
14636
  * @function getTypeUrl
14561
- * @memberof google.maps.places.v1.Place.ContainingPlace
14637
+ * @memberof google.maps.places.v1.Place.GoogleMapsLinks
14562
14638
  * @static
14563
14639
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
14564
14640
  * @returns {string} The default type url
14565
14641
  */
14566
- ContainingPlace.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14642
+ GoogleMapsLinks.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14567
14643
  if (typeUrlPrefix === undefined) {
14568
14644
  typeUrlPrefix = "type.googleapis.com";
14569
14645
  }
14570
- return typeUrlPrefix + "/google.maps.places.v1.Place.ContainingPlace";
14646
+ return typeUrlPrefix + "/google.maps.places.v1.Place.GoogleMapsLinks";
14571
14647
  };
14572
14648
 
14573
- return ContainingPlace;
14649
+ return GoogleMapsLinks;
14574
14650
  })();
14575
14651
 
14576
14652
  Place.ReviewSummary = (function() {
@@ -24508,219 +24584,485 @@
24508
24584
  Leg.prototype.distanceMeters = 0;
24509
24585
 
24510
24586
  /**
24511
- * Creates a new Leg instance using the specified properties.
24512
- * @function create
24587
+ * Creates a new Leg instance using the specified properties.
24588
+ * @function create
24589
+ * @memberof google.maps.places.v1.RoutingSummary.Leg
24590
+ * @static
24591
+ * @param {google.maps.places.v1.RoutingSummary.ILeg=} [properties] Properties to set
24592
+ * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg instance
24593
+ */
24594
+ Leg.create = function create(properties) {
24595
+ return new Leg(properties);
24596
+ };
24597
+
24598
+ /**
24599
+ * Encodes the specified Leg message. Does not implicitly {@link google.maps.places.v1.RoutingSummary.Leg.verify|verify} messages.
24600
+ * @function encode
24601
+ * @memberof google.maps.places.v1.RoutingSummary.Leg
24602
+ * @static
24603
+ * @param {google.maps.places.v1.RoutingSummary.ILeg} message Leg message or plain object to encode
24604
+ * @param {$protobuf.Writer} [writer] Writer to encode to
24605
+ * @returns {$protobuf.Writer} Writer
24606
+ */
24607
+ Leg.encode = function encode(message, writer) {
24608
+ if (!writer)
24609
+ writer = $Writer.create();
24610
+ if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
24611
+ $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
24612
+ if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters"))
24613
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.distanceMeters);
24614
+ return writer;
24615
+ };
24616
+
24617
+ /**
24618
+ * Encodes the specified Leg message, length delimited. Does not implicitly {@link google.maps.places.v1.RoutingSummary.Leg.verify|verify} messages.
24619
+ * @function encodeDelimited
24620
+ * @memberof google.maps.places.v1.RoutingSummary.Leg
24621
+ * @static
24622
+ * @param {google.maps.places.v1.RoutingSummary.ILeg} message Leg message or plain object to encode
24623
+ * @param {$protobuf.Writer} [writer] Writer to encode to
24624
+ * @returns {$protobuf.Writer} Writer
24625
+ */
24626
+ Leg.encodeDelimited = function encodeDelimited(message, writer) {
24627
+ return this.encode(message, writer).ldelim();
24628
+ };
24629
+
24630
+ /**
24631
+ * Decodes a Leg message from the specified reader or buffer.
24632
+ * @function decode
24633
+ * @memberof google.maps.places.v1.RoutingSummary.Leg
24634
+ * @static
24635
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
24636
+ * @param {number} [length] Message length if known beforehand
24637
+ * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
24638
+ * @throws {Error} If the payload is not a reader or valid buffer
24639
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
24640
+ */
24641
+ Leg.decode = function decode(reader, length, error) {
24642
+ if (!(reader instanceof $Reader))
24643
+ reader = $Reader.create(reader);
24644
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.RoutingSummary.Leg();
24645
+ while (reader.pos < end) {
24646
+ var tag = reader.uint32();
24647
+ if (tag === error)
24648
+ break;
24649
+ switch (tag >>> 3) {
24650
+ case 1: {
24651
+ message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
24652
+ break;
24653
+ }
24654
+ case 2: {
24655
+ message.distanceMeters = reader.int32();
24656
+ break;
24657
+ }
24658
+ default:
24659
+ reader.skipType(tag & 7);
24660
+ break;
24661
+ }
24662
+ }
24663
+ return message;
24664
+ };
24665
+
24666
+ /**
24667
+ * Decodes a Leg message from the specified reader or buffer, length delimited.
24668
+ * @function decodeDelimited
24669
+ * @memberof google.maps.places.v1.RoutingSummary.Leg
24670
+ * @static
24671
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
24672
+ * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
24673
+ * @throws {Error} If the payload is not a reader or valid buffer
24674
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
24675
+ */
24676
+ Leg.decodeDelimited = function decodeDelimited(reader) {
24677
+ if (!(reader instanceof $Reader))
24678
+ reader = new $Reader(reader);
24679
+ return this.decode(reader, reader.uint32());
24680
+ };
24681
+
24682
+ /**
24683
+ * Verifies a Leg message.
24684
+ * @function verify
24685
+ * @memberof google.maps.places.v1.RoutingSummary.Leg
24686
+ * @static
24687
+ * @param {Object.<string,*>} message Plain object to verify
24688
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
24689
+ */
24690
+ Leg.verify = function verify(message) {
24691
+ if (typeof message !== "object" || message === null)
24692
+ return "object expected";
24693
+ if (message.duration != null && message.hasOwnProperty("duration")) {
24694
+ var error = $root.google.protobuf.Duration.verify(message.duration);
24695
+ if (error)
24696
+ return "duration." + error;
24697
+ }
24698
+ if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
24699
+ if (!$util.isInteger(message.distanceMeters))
24700
+ return "distanceMeters: integer expected";
24701
+ return null;
24702
+ };
24703
+
24704
+ /**
24705
+ * Creates a Leg message from a plain object. Also converts values to their respective internal types.
24706
+ * @function fromObject
24513
24707
  * @memberof google.maps.places.v1.RoutingSummary.Leg
24514
24708
  * @static
24515
- * @param {google.maps.places.v1.RoutingSummary.ILeg=} [properties] Properties to set
24516
- * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg instance
24709
+ * @param {Object.<string,*>} object Plain object
24710
+ * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
24517
24711
  */
24518
- Leg.create = function create(properties) {
24519
- return new Leg(properties);
24712
+ Leg.fromObject = function fromObject(object) {
24713
+ if (object instanceof $root.google.maps.places.v1.RoutingSummary.Leg)
24714
+ return object;
24715
+ var message = new $root.google.maps.places.v1.RoutingSummary.Leg();
24716
+ if (object.duration != null) {
24717
+ if (typeof object.duration !== "object")
24718
+ throw TypeError(".google.maps.places.v1.RoutingSummary.Leg.duration: object expected");
24719
+ message.duration = $root.google.protobuf.Duration.fromObject(object.duration);
24720
+ }
24721
+ if (object.distanceMeters != null)
24722
+ message.distanceMeters = object.distanceMeters | 0;
24723
+ return message;
24520
24724
  };
24521
24725
 
24522
24726
  /**
24523
- * Encodes the specified Leg message. Does not implicitly {@link google.maps.places.v1.RoutingSummary.Leg.verify|verify} messages.
24524
- * @function encode
24727
+ * Creates a plain object from a Leg message. Also converts values to other types if specified.
24728
+ * @function toObject
24525
24729
  * @memberof google.maps.places.v1.RoutingSummary.Leg
24526
24730
  * @static
24527
- * @param {google.maps.places.v1.RoutingSummary.ILeg} message Leg message or plain object to encode
24528
- * @param {$protobuf.Writer} [writer] Writer to encode to
24529
- * @returns {$protobuf.Writer} Writer
24731
+ * @param {google.maps.places.v1.RoutingSummary.Leg} message Leg
24732
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
24733
+ * @returns {Object.<string,*>} Plain object
24530
24734
  */
24531
- Leg.encode = function encode(message, writer) {
24532
- if (!writer)
24533
- writer = $Writer.create();
24534
- if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
24535
- $root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
24536
- if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters"))
24537
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.distanceMeters);
24538
- return writer;
24735
+ Leg.toObject = function toObject(message, options) {
24736
+ if (!options)
24737
+ options = {};
24738
+ var object = {};
24739
+ if (options.defaults) {
24740
+ object.duration = null;
24741
+ object.distanceMeters = 0;
24742
+ }
24743
+ if (message.duration != null && message.hasOwnProperty("duration"))
24744
+ object.duration = $root.google.protobuf.Duration.toObject(message.duration, options);
24745
+ if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
24746
+ object.distanceMeters = message.distanceMeters;
24747
+ return object;
24539
24748
  };
24540
24749
 
24541
24750
  /**
24542
- * Encodes the specified Leg message, length delimited. Does not implicitly {@link google.maps.places.v1.RoutingSummary.Leg.verify|verify} messages.
24543
- * @function encodeDelimited
24751
+ * Converts this Leg to JSON.
24752
+ * @function toJSON
24544
24753
  * @memberof google.maps.places.v1.RoutingSummary.Leg
24545
- * @static
24546
- * @param {google.maps.places.v1.RoutingSummary.ILeg} message Leg message or plain object to encode
24547
- * @param {$protobuf.Writer} [writer] Writer to encode to
24548
- * @returns {$protobuf.Writer} Writer
24754
+ * @instance
24755
+ * @returns {Object.<string,*>} JSON object
24549
24756
  */
24550
- Leg.encodeDelimited = function encodeDelimited(message, writer) {
24551
- return this.encode(message, writer).ldelim();
24757
+ Leg.prototype.toJSON = function toJSON() {
24758
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
24552
24759
  };
24553
24760
 
24554
24761
  /**
24555
- * Decodes a Leg message from the specified reader or buffer.
24556
- * @function decode
24762
+ * Gets the default type url for Leg
24763
+ * @function getTypeUrl
24557
24764
  * @memberof google.maps.places.v1.RoutingSummary.Leg
24558
24765
  * @static
24559
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
24560
- * @param {number} [length] Message length if known beforehand
24561
- * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
24562
- * @throws {Error} If the payload is not a reader or valid buffer
24563
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
24766
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
24767
+ * @returns {string} The default type url
24564
24768
  */
24565
- Leg.decode = function decode(reader, length, error) {
24566
- if (!(reader instanceof $Reader))
24567
- reader = $Reader.create(reader);
24568
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.RoutingSummary.Leg();
24569
- while (reader.pos < end) {
24570
- var tag = reader.uint32();
24571
- if (tag === error)
24769
+ Leg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
24770
+ if (typeUrlPrefix === undefined) {
24771
+ typeUrlPrefix = "type.googleapis.com";
24772
+ }
24773
+ return typeUrlPrefix + "/google.maps.places.v1.RoutingSummary.Leg";
24774
+ };
24775
+
24776
+ return Leg;
24777
+ })();
24778
+
24779
+ return RoutingSummary;
24780
+ })();
24781
+
24782
+ /**
24783
+ * TravelMode enum.
24784
+ * @name google.maps.places.v1.TravelMode
24785
+ * @enum {number}
24786
+ * @property {number} TRAVEL_MODE_UNSPECIFIED=0 TRAVEL_MODE_UNSPECIFIED value
24787
+ * @property {number} DRIVE=1 DRIVE value
24788
+ * @property {number} BICYCLE=2 BICYCLE value
24789
+ * @property {number} WALK=3 WALK value
24790
+ * @property {number} TWO_WHEELER=4 TWO_WHEELER value
24791
+ */
24792
+ v1.TravelMode = (function() {
24793
+ var valuesById = {}, values = Object.create(valuesById);
24794
+ values[valuesById[0] = "TRAVEL_MODE_UNSPECIFIED"] = 0;
24795
+ values[valuesById[1] = "DRIVE"] = 1;
24796
+ values[valuesById[2] = "BICYCLE"] = 2;
24797
+ values[valuesById[3] = "WALK"] = 3;
24798
+ values[valuesById[4] = "TWO_WHEELER"] = 4;
24799
+ return values;
24800
+ })();
24801
+
24802
+ v1.References = (function() {
24803
+
24804
+ /**
24805
+ * Properties of a References.
24806
+ * @memberof google.maps.places.v1
24807
+ * @interface IReferences
24808
+ * @property {Array.<google.maps.places.v1.IReview>|null} [reviews] References reviews
24809
+ * @property {Array.<string>|null} [places] References places
24810
+ */
24811
+
24812
+ /**
24813
+ * Constructs a new References.
24814
+ * @memberof google.maps.places.v1
24815
+ * @classdesc Represents a References.
24816
+ * @implements IReferences
24817
+ * @constructor
24818
+ * @param {google.maps.places.v1.IReferences=} [properties] Properties to set
24819
+ */
24820
+ function References(properties) {
24821
+ this.reviews = [];
24822
+ this.places = [];
24823
+ if (properties)
24824
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
24825
+ if (properties[keys[i]] != null)
24826
+ this[keys[i]] = properties[keys[i]];
24827
+ }
24828
+
24829
+ /**
24830
+ * References reviews.
24831
+ * @member {Array.<google.maps.places.v1.IReview>} reviews
24832
+ * @memberof google.maps.places.v1.References
24833
+ * @instance
24834
+ */
24835
+ References.prototype.reviews = $util.emptyArray;
24836
+
24837
+ /**
24838
+ * References places.
24839
+ * @member {Array.<string>} places
24840
+ * @memberof google.maps.places.v1.References
24841
+ * @instance
24842
+ */
24843
+ References.prototype.places = $util.emptyArray;
24844
+
24845
+ /**
24846
+ * Creates a new References instance using the specified properties.
24847
+ * @function create
24848
+ * @memberof google.maps.places.v1.References
24849
+ * @static
24850
+ * @param {google.maps.places.v1.IReferences=} [properties] Properties to set
24851
+ * @returns {google.maps.places.v1.References} References instance
24852
+ */
24853
+ References.create = function create(properties) {
24854
+ return new References(properties);
24855
+ };
24856
+
24857
+ /**
24858
+ * Encodes the specified References message. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages.
24859
+ * @function encode
24860
+ * @memberof google.maps.places.v1.References
24861
+ * @static
24862
+ * @param {google.maps.places.v1.IReferences} message References message or plain object to encode
24863
+ * @param {$protobuf.Writer} [writer] Writer to encode to
24864
+ * @returns {$protobuf.Writer} Writer
24865
+ */
24866
+ References.encode = function encode(message, writer) {
24867
+ if (!writer)
24868
+ writer = $Writer.create();
24869
+ if (message.reviews != null && message.reviews.length)
24870
+ for (var i = 0; i < message.reviews.length; ++i)
24871
+ $root.google.maps.places.v1.Review.encode(message.reviews[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
24872
+ if (message.places != null && message.places.length)
24873
+ for (var i = 0; i < message.places.length; ++i)
24874
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.places[i]);
24875
+ return writer;
24876
+ };
24877
+
24878
+ /**
24879
+ * Encodes the specified References message, length delimited. Does not implicitly {@link google.maps.places.v1.References.verify|verify} messages.
24880
+ * @function encodeDelimited
24881
+ * @memberof google.maps.places.v1.References
24882
+ * @static
24883
+ * @param {google.maps.places.v1.IReferences} message References message or plain object to encode
24884
+ * @param {$protobuf.Writer} [writer] Writer to encode to
24885
+ * @returns {$protobuf.Writer} Writer
24886
+ */
24887
+ References.encodeDelimited = function encodeDelimited(message, writer) {
24888
+ return this.encode(message, writer).ldelim();
24889
+ };
24890
+
24891
+ /**
24892
+ * Decodes a References message from the specified reader or buffer.
24893
+ * @function decode
24894
+ * @memberof google.maps.places.v1.References
24895
+ * @static
24896
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
24897
+ * @param {number} [length] Message length if known beforehand
24898
+ * @returns {google.maps.places.v1.References} References
24899
+ * @throws {Error} If the payload is not a reader or valid buffer
24900
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
24901
+ */
24902
+ References.decode = function decode(reader, length, error) {
24903
+ if (!(reader instanceof $Reader))
24904
+ reader = $Reader.create(reader);
24905
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.References();
24906
+ while (reader.pos < end) {
24907
+ var tag = reader.uint32();
24908
+ if (tag === error)
24909
+ break;
24910
+ switch (tag >>> 3) {
24911
+ case 1: {
24912
+ if (!(message.reviews && message.reviews.length))
24913
+ message.reviews = [];
24914
+ message.reviews.push($root.google.maps.places.v1.Review.decode(reader, reader.uint32()));
24572
24915
  break;
24573
- switch (tag >>> 3) {
24574
- case 1: {
24575
- message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
24576
- break;
24577
- }
24578
- case 2: {
24579
- message.distanceMeters = reader.int32();
24580
- break;
24581
- }
24582
- default:
24583
- reader.skipType(tag & 7);
24916
+ }
24917
+ case 2: {
24918
+ if (!(message.places && message.places.length))
24919
+ message.places = [];
24920
+ message.places.push(reader.string());
24584
24921
  break;
24585
24922
  }
24923
+ default:
24924
+ reader.skipType(tag & 7);
24925
+ break;
24586
24926
  }
24587
- return message;
24588
- };
24927
+ }
24928
+ return message;
24929
+ };
24589
24930
 
24590
- /**
24591
- * Decodes a Leg message from the specified reader or buffer, length delimited.
24592
- * @function decodeDelimited
24593
- * @memberof google.maps.places.v1.RoutingSummary.Leg
24594
- * @static
24595
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
24596
- * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
24597
- * @throws {Error} If the payload is not a reader or valid buffer
24598
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
24599
- */
24600
- Leg.decodeDelimited = function decodeDelimited(reader) {
24601
- if (!(reader instanceof $Reader))
24602
- reader = new $Reader(reader);
24603
- return this.decode(reader, reader.uint32());
24604
- };
24931
+ /**
24932
+ * Decodes a References message from the specified reader or buffer, length delimited.
24933
+ * @function decodeDelimited
24934
+ * @memberof google.maps.places.v1.References
24935
+ * @static
24936
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
24937
+ * @returns {google.maps.places.v1.References} References
24938
+ * @throws {Error} If the payload is not a reader or valid buffer
24939
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
24940
+ */
24941
+ References.decodeDelimited = function decodeDelimited(reader) {
24942
+ if (!(reader instanceof $Reader))
24943
+ reader = new $Reader(reader);
24944
+ return this.decode(reader, reader.uint32());
24945
+ };
24605
24946
 
24606
- /**
24607
- * Verifies a Leg message.
24608
- * @function verify
24609
- * @memberof google.maps.places.v1.RoutingSummary.Leg
24610
- * @static
24611
- * @param {Object.<string,*>} message Plain object to verify
24612
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
24613
- */
24614
- Leg.verify = function verify(message) {
24615
- if (typeof message !== "object" || message === null)
24616
- return "object expected";
24617
- if (message.duration != null && message.hasOwnProperty("duration")) {
24618
- var error = $root.google.protobuf.Duration.verify(message.duration);
24947
+ /**
24948
+ * Verifies a References message.
24949
+ * @function verify
24950
+ * @memberof google.maps.places.v1.References
24951
+ * @static
24952
+ * @param {Object.<string,*>} message Plain object to verify
24953
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
24954
+ */
24955
+ References.verify = function verify(message) {
24956
+ if (typeof message !== "object" || message === null)
24957
+ return "object expected";
24958
+ if (message.reviews != null && message.hasOwnProperty("reviews")) {
24959
+ if (!Array.isArray(message.reviews))
24960
+ return "reviews: array expected";
24961
+ for (var i = 0; i < message.reviews.length; ++i) {
24962
+ var error = $root.google.maps.places.v1.Review.verify(message.reviews[i]);
24619
24963
  if (error)
24620
- return "duration." + error;
24621
- }
24622
- if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
24623
- if (!$util.isInteger(message.distanceMeters))
24624
- return "distanceMeters: integer expected";
24625
- return null;
24626
- };
24627
-
24628
- /**
24629
- * Creates a Leg message from a plain object. Also converts values to their respective internal types.
24630
- * @function fromObject
24631
- * @memberof google.maps.places.v1.RoutingSummary.Leg
24632
- * @static
24633
- * @param {Object.<string,*>} object Plain object
24634
- * @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
24635
- */
24636
- Leg.fromObject = function fromObject(object) {
24637
- if (object instanceof $root.google.maps.places.v1.RoutingSummary.Leg)
24638
- return object;
24639
- var message = new $root.google.maps.places.v1.RoutingSummary.Leg();
24640
- if (object.duration != null) {
24641
- if (typeof object.duration !== "object")
24642
- throw TypeError(".google.maps.places.v1.RoutingSummary.Leg.duration: object expected");
24643
- message.duration = $root.google.protobuf.Duration.fromObject(object.duration);
24964
+ return "reviews." + error;
24644
24965
  }
24645
- if (object.distanceMeters != null)
24646
- message.distanceMeters = object.distanceMeters | 0;
24647
- return message;
24648
- };
24966
+ }
24967
+ if (message.places != null && message.hasOwnProperty("places")) {
24968
+ if (!Array.isArray(message.places))
24969
+ return "places: array expected";
24970
+ for (var i = 0; i < message.places.length; ++i)
24971
+ if (!$util.isString(message.places[i]))
24972
+ return "places: string[] expected";
24973
+ }
24974
+ return null;
24975
+ };
24649
24976
 
24650
- /**
24651
- * Creates a plain object from a Leg message. Also converts values to other types if specified.
24652
- * @function toObject
24653
- * @memberof google.maps.places.v1.RoutingSummary.Leg
24654
- * @static
24655
- * @param {google.maps.places.v1.RoutingSummary.Leg} message Leg
24656
- * @param {$protobuf.IConversionOptions} [options] Conversion options
24657
- * @returns {Object.<string,*>} Plain object
24658
- */
24659
- Leg.toObject = function toObject(message, options) {
24660
- if (!options)
24661
- options = {};
24662
- var object = {};
24663
- if (options.defaults) {
24664
- object.duration = null;
24665
- object.distanceMeters = 0;
24666
- }
24667
- if (message.duration != null && message.hasOwnProperty("duration"))
24668
- object.duration = $root.google.protobuf.Duration.toObject(message.duration, options);
24669
- if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
24670
- object.distanceMeters = message.distanceMeters;
24977
+ /**
24978
+ * Creates a References message from a plain object. Also converts values to their respective internal types.
24979
+ * @function fromObject
24980
+ * @memberof google.maps.places.v1.References
24981
+ * @static
24982
+ * @param {Object.<string,*>} object Plain object
24983
+ * @returns {google.maps.places.v1.References} References
24984
+ */
24985
+ References.fromObject = function fromObject(object) {
24986
+ if (object instanceof $root.google.maps.places.v1.References)
24671
24987
  return object;
24672
- };
24673
-
24674
- /**
24675
- * Converts this Leg to JSON.
24676
- * @function toJSON
24677
- * @memberof google.maps.places.v1.RoutingSummary.Leg
24678
- * @instance
24679
- * @returns {Object.<string,*>} JSON object
24680
- */
24681
- Leg.prototype.toJSON = function toJSON() {
24682
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
24683
- };
24684
-
24685
- /**
24686
- * Gets the default type url for Leg
24687
- * @function getTypeUrl
24688
- * @memberof google.maps.places.v1.RoutingSummary.Leg
24689
- * @static
24690
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
24691
- * @returns {string} The default type url
24692
- */
24693
- Leg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
24694
- if (typeUrlPrefix === undefined) {
24695
- typeUrlPrefix = "type.googleapis.com";
24988
+ var message = new $root.google.maps.places.v1.References();
24989
+ if (object.reviews) {
24990
+ if (!Array.isArray(object.reviews))
24991
+ throw TypeError(".google.maps.places.v1.References.reviews: array expected");
24992
+ message.reviews = [];
24993
+ for (var i = 0; i < object.reviews.length; ++i) {
24994
+ if (typeof object.reviews[i] !== "object")
24995
+ throw TypeError(".google.maps.places.v1.References.reviews: object expected");
24996
+ message.reviews[i] = $root.google.maps.places.v1.Review.fromObject(object.reviews[i]);
24696
24997
  }
24697
- return typeUrlPrefix + "/google.maps.places.v1.RoutingSummary.Leg";
24698
- };
24998
+ }
24999
+ if (object.places) {
25000
+ if (!Array.isArray(object.places))
25001
+ throw TypeError(".google.maps.places.v1.References.places: array expected");
25002
+ message.places = [];
25003
+ for (var i = 0; i < object.places.length; ++i)
25004
+ message.places[i] = String(object.places[i]);
25005
+ }
25006
+ return message;
25007
+ };
24699
25008
 
24700
- return Leg;
24701
- })();
25009
+ /**
25010
+ * Creates a plain object from a References message. Also converts values to other types if specified.
25011
+ * @function toObject
25012
+ * @memberof google.maps.places.v1.References
25013
+ * @static
25014
+ * @param {google.maps.places.v1.References} message References
25015
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
25016
+ * @returns {Object.<string,*>} Plain object
25017
+ */
25018
+ References.toObject = function toObject(message, options) {
25019
+ if (!options)
25020
+ options = {};
25021
+ var object = {};
25022
+ if (options.arrays || options.defaults) {
25023
+ object.reviews = [];
25024
+ object.places = [];
25025
+ }
25026
+ if (message.reviews && message.reviews.length) {
25027
+ object.reviews = [];
25028
+ for (var j = 0; j < message.reviews.length; ++j)
25029
+ object.reviews[j] = $root.google.maps.places.v1.Review.toObject(message.reviews[j], options);
25030
+ }
25031
+ if (message.places && message.places.length) {
25032
+ object.places = [];
25033
+ for (var j = 0; j < message.places.length; ++j)
25034
+ object.places[j] = message.places[j];
25035
+ }
25036
+ return object;
25037
+ };
24702
25038
 
24703
- return RoutingSummary;
24704
- })();
25039
+ /**
25040
+ * Converts this References to JSON.
25041
+ * @function toJSON
25042
+ * @memberof google.maps.places.v1.References
25043
+ * @instance
25044
+ * @returns {Object.<string,*>} JSON object
25045
+ */
25046
+ References.prototype.toJSON = function toJSON() {
25047
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
25048
+ };
24705
25049
 
24706
- /**
24707
- * TravelMode enum.
24708
- * @name google.maps.places.v1.TravelMode
24709
- * @enum {number}
24710
- * @property {number} TRAVEL_MODE_UNSPECIFIED=0 TRAVEL_MODE_UNSPECIFIED value
24711
- * @property {number} DRIVE=1 DRIVE value
24712
- * @property {number} BICYCLE=2 BICYCLE value
24713
- * @property {number} WALK=3 WALK value
24714
- * @property {number} TWO_WHEELER=4 TWO_WHEELER value
24715
- */
24716
- v1.TravelMode = (function() {
24717
- var valuesById = {}, values = Object.create(valuesById);
24718
- values[valuesById[0] = "TRAVEL_MODE_UNSPECIFIED"] = 0;
24719
- values[valuesById[1] = "DRIVE"] = 1;
24720
- values[valuesById[2] = "BICYCLE"] = 2;
24721
- values[valuesById[3] = "WALK"] = 3;
24722
- values[valuesById[4] = "TWO_WHEELER"] = 4;
24723
- return values;
25050
+ /**
25051
+ * Gets the default type url for References
25052
+ * @function getTypeUrl
25053
+ * @memberof google.maps.places.v1.References
25054
+ * @static
25055
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
25056
+ * @returns {string} The default type url
25057
+ */
25058
+ References.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
25059
+ if (typeUrlPrefix === undefined) {
25060
+ typeUrlPrefix = "type.googleapis.com";
25061
+ }
25062
+ return typeUrlPrefix + "/google.maps.places.v1.References";
25063
+ };
25064
+
25065
+ return References;
24724
25066
  })();
24725
25067
 
24726
25068
  return v1;